public BadCase3() { m_resource = new System.Runtime.InteropServices.HandleRef(); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.RenderTask.delete_RenderTask(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.PageFactory.DeletePageFactory(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.KeyInputFocusManager.DeleteKeyInputFocusManager(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Layer.DeleteLayer(swigCPtr); }
/// <summary> /// Strips type library number from a type library path (for example, "ref.dll\2" becomes "ref.dll") /// </summary> /// <param name="typeLibPath">type library path with possible typelib number appended to it</param> /// <returns>proper file path to the type library</returns> internal static string StripTypeLibNumberFromPath(string typeLibPath, FileExists fileExists) { bool lastChance = false; if (!string.IsNullOrEmpty(typeLibPath)) { if (!fileExists(typeLibPath)) { // Strip the type library number int lastSlash = typeLibPath.LastIndexOf('\\'); if (lastSlash != -1) { bool allNumbers = true; for (int i = lastSlash + 1; i < typeLibPath.Length; i++) { if (!Char.IsDigit(typeLibPath[i])) { allNumbers = false; break; } } // If we had all numbers past the last slash then we're OK to strip // the type library number if (allNumbers) { typeLibPath = typeLibPath.Substring(0, lastSlash); if (!fileExists(typeLibPath)) { lastChance = true; } } else { lastChance = true; } } else { lastChance = true; } } } // If we couldn't find the path directly, we'll use the same mechanism Windows uses to find // libraries. LoadLibrary() will search all of the correct paths to find this module. We can then // use GetModuleFileName() to determine the actual path from which the module was loaded. This problem // was exposed in Vista where certain libraries are registered but are lacking paths in the registry, // so the old code would fail to find them on disk using the simplistic checks above. if (lastChance) { IntPtr libraryHandle = NativeMethodsShared.LoadLibrary(typeLibPath); if (IntPtr.Zero != libraryHandle) { try { var sb = new StringBuilder(NativeMethodsShared.MAX_PATH); System.Runtime.InteropServices.HandleRef handleRef = new System.Runtime.InteropServices.HandleRef(sb, libraryHandle); int len = NativeMethodsShared.GetModuleFileName(handleRef, sb, sb.Capacity); if ((len != 0) && ((uint)Marshal.GetLastWin32Error() != NativeMethodsShared.ERROR_INSUFFICIENT_BUFFER)) { typeLibPath = sb.ToString(); } else { typeLibPath = ""; } } finally { NativeMethodsShared.FreeLibrary(libraryHandle); } } else { typeLibPath = ""; } } return(typeLibPath); }
protected virtual void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { }
public static extern bool PostMessage(System.Runtime.InteropServices.HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam);
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Item.delete_Item(swigCPtr); }
internal static extern bool GetWindowRect(System.Runtime.InteropServices.HandleRef hWnd, [System.Runtime.InteropServices.In, System.Runtime.InteropServices.Out] ref RECT rect);
public static extern IntPtr SendMessage(System.Runtime.InteropServices.HandleRef hWnd, int msg, int wParam, int lParam);
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.WidgetView.DeleteWidgetViewSignal(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.ButtonSignal.DeleteButtonSignal(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Vector3.DeleteVector3(swigCPtr); }
/// <summary> /// Clear the C++ 'this' pointer of the underlying unmanaged object. DO /// NOT CALL THIS METHOD DIRECTLY. This method is called automatically as /// needed by generated code. /// </summary> protected void ClearCppThis() { if (this.CppThis.Handle != System.IntPtr.Zero) { Kitware.mummy.Runtime.Methods.RemoveTableReference(this.CppThis.Handle); } this.CppThis = new System.Runtime.InteropServices.HandleRef(); this.CallDisposalMethod = false; }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.CameraActor.delete_CameraActor(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.KeyFrames.DeleteKeyFrames(swigCPtr); }
/// <summary> /// Dispose /// </summary> protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.ContentReceivedSignalType.DeleteContentReceivedSignalType(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.WebCertificate.DeleteWebCertificate(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.TextLabel.DeleteTextLabel(swigCPtr); }
internal LongElement(System.IntPtr cPtr, bool cMemoryOwn) : base(SharingClientPINVOKE.LongElement_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new System.Runtime.InteropServices.HandleRef(this, cPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.FontClient.DeleteFontClientGlyphBufferData(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.ObjectDestroyedSignal.DeleteObjectDestroyedSignal(swigCPtr); }
internal AudioListener() { _cPtr = new System.Runtime.InteropServices.HandleRef(this, NativeAudioSystem.CreateAudioListener()); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Watch.DeleteWatchTime(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.WebView.DeleteWebViewScrollEdgeReachedSignal(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.TouchPointContainer.DeleteTouchPointContainer(swigCPtr); }
private static extern bool GetWindowRect(System.Runtime.InteropServices.HandleRef hwnd, out Rect lpRect);
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.PushButton.delete_PushButton(swigCPtr); }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.FocusGroupChangedSignal.DeleteFocusGroupChangedSignal(swigCPtr); }
/// <summary> /// Strips type library number from a type library path (for example, "ref.dll\2" becomes "ref.dll") /// </summary> /// <param name="typeLibPath">type library path with possible typelib number appended to it</param> /// <returns>proper file path to the type library</returns> internal static string StripTypeLibNumberFromPath(string typeLibPath, FileExists fileExists) { bool lastChance = false; if (typeLibPath != null && typeLibPath.Length > 0) { if (!fileExists(typeLibPath)) { // Strip the type library number int lastSlash = typeLibPath.LastIndexOf('\\'); if (lastSlash != -1) { bool allNumbers = true; for (int i = lastSlash + 1; i < typeLibPath.Length; i++) { if (!Char.IsDigit(typeLibPath[i])) { allNumbers = false; break; } } // If we had all numbers past the last slash then we're OK to strip // the type library number if (allNumbers) { typeLibPath = typeLibPath.Substring(0, lastSlash); if (!fileExists(typeLibPath)) { lastChance = true; } } else { lastChance = true; } } else { lastChance = true; } } } // If we couldn't find the path directly, we'll use the same mechanism Windows uses to find // libraries. LoadLibrary() will search all of the correct paths to find this module. We can then // use GetModuleFileName() to determine the actual path from which the module was loaded. This problem // was exposed in Vista where certain libraries are registered but are lacking paths in the registry, // so the old code would fail to find them on disk using the simplistic checks above. if (lastChance) { IntPtr libraryHandle = NativeMethodsShared.LoadLibrary(typeLibPath); if (IntPtr.Zero != libraryHandle) { try { StringBuilder sb = new StringBuilder(NativeMethodsShared.MAX_PATH); System.Runtime.InteropServices.HandleRef handleRef = new System.Runtime.InteropServices.HandleRef(sb, libraryHandle); int len = NativeMethodsShared.GetModuleFileName(handleRef, sb, sb.Capacity); if ((len != 0) && ((uint)Marshal.GetLastWin32Error() != NativeMethodsShared.ERROR_INSUFFICIENT_BUFFER)) { typeLibPath = sb.ToString(); } else { typeLibPath = ""; } } finally { NativeMethodsShared.FreeLibrary(libraryHandle); } } else { typeLibPath = ""; } } return typeLibPath; }
//you can override it to clean-up your own resources. protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { throw new global::System.MethodAccessException("C++ destructor does not have public access"); }
/// <summary> /// Set the C++ 'this' pointer of the underlying unmanaged object. DO NOT /// CALL THIS METHOD DIRECTLY. This method is called automatically as /// needed by generated code. /// </summary> protected void SetCppThis(System.IntPtr rawCppThis, bool callDisposalMethod, bool strong) { this.CppThis = new System.Runtime.InteropServices.HandleRef(this, rawCppThis); this.CallDisposalMethod = callDisposalMethod; if (rawCppThis != System.IntPtr.Zero) { Kitware.mummy.Runtime.Methods.AddTableReference(rawCppThis, this, strong); } }
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Rotation.DeleteRotation(swigCPtr); }