Ejemplo n.º 1
0
 public BadCase3()
 {
     m_resource = new System.Runtime.InteropServices.HandleRef();
 }
Ejemplo n.º 2
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.RenderTask.delete_RenderTask(swigCPtr);
 }
Ejemplo n.º 3
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.PageFactory.DeletePageFactory(swigCPtr);
 }
Ejemplo n.º 4
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.KeyInputFocusManager.DeleteKeyInputFocusManager(swigCPtr);
 }
Ejemplo n.º 5
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.Layer.DeleteLayer(swigCPtr);
 }
Ejemplo n.º 6
0
        /// <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);
        }
Ejemplo n.º 7
0
 protected virtual void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
 }
Ejemplo n.º 8
0
 public static extern bool PostMessage(System.Runtime.InteropServices.HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam);
Ejemplo n.º 9
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.Item.delete_Item(swigCPtr);
 }
Ejemplo n.º 10
0
 internal static extern bool GetWindowRect(System.Runtime.InteropServices.HandleRef hWnd,
                                           [System.Runtime.InteropServices.In, System.Runtime.InteropServices.Out] ref RECT rect);
Ejemplo n.º 11
0
 public static extern IntPtr SendMessage(System.Runtime.InteropServices.HandleRef hWnd, int msg, int wParam, int lParam);
Ejemplo n.º 12
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.WidgetView.DeleteWidgetViewSignal(swigCPtr);
 }
Ejemplo n.º 13
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.ButtonSignal.DeleteButtonSignal(swigCPtr);
 }
Ejemplo n.º 14
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.Vector3.DeleteVector3(swigCPtr);
 }
Ejemplo n.º 15
0
        /// <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;
        }
Ejemplo n.º 16
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.CameraActor.delete_CameraActor(swigCPtr);
 }
Ejemplo n.º 17
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.KeyFrames.DeleteKeyFrames(swigCPtr);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Dispose
 /// </summary>
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.ContentReceivedSignalType.DeleteContentReceivedSignalType(swigCPtr);
 }
Ejemplo n.º 19
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.WebCertificate.DeleteWebCertificate(swigCPtr);
 }
Ejemplo n.º 20
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.TextLabel.DeleteTextLabel(swigCPtr);
 }
Ejemplo n.º 21
0
 internal LongElement(System.IntPtr cPtr, bool cMemoryOwn) : base(SharingClientPINVOKE.LongElement_SWIGUpcast(cPtr), cMemoryOwn)
 {
     swigCPtr = new System.Runtime.InteropServices.HandleRef(this, cPtr);
 }
Ejemplo n.º 22
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.FontClient.DeleteFontClientGlyphBufferData(swigCPtr);
 }
Ejemplo n.º 23
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.ObjectDestroyedSignal.DeleteObjectDestroyedSignal(swigCPtr);
 }
Ejemplo n.º 24
0
 internal AudioListener()
 {
     _cPtr = new System.Runtime.InteropServices.HandleRef(this, NativeAudioSystem.CreateAudioListener());
 }
Ejemplo n.º 25
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.Watch.DeleteWatchTime(swigCPtr);
 }
Ejemplo n.º 26
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.WebView.DeleteWebViewScrollEdgeReachedSignal(swigCPtr);
 }
Ejemplo n.º 27
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.TouchPointContainer.DeleteTouchPointContainer(swigCPtr);
 }
Ejemplo n.º 28
0
 private static extern bool GetWindowRect(System.Runtime.InteropServices.HandleRef hwnd, out Rect lpRect);
Ejemplo n.º 29
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.PushButton.delete_PushButton(swigCPtr);
 }
Ejemplo n.º 30
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.FocusGroupChangedSignal.DeleteFocusGroupChangedSignal(swigCPtr);
 }
Ejemplo n.º 31
0
        /// <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;
        }
Ejemplo n.º 32
0
 //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");
 }
Ejemplo n.º 33
0
        /// <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);
              }
        }
Ejemplo n.º 34
0
 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
 {
     Interop.Rotation.DeleteRotation(swigCPtr);
 }