Mono.Interop.ComInteropProxy.FindProxy C# (CSharp) Method

FindProxy() private method

private FindProxy ( IntPtr pItf ) : ComInteropProxy
pItf System.IntPtr
return ComInteropProxy
		internal extern static ComInteropProxy FindProxy (IntPtr pItf);

Usage Example

        internal static ComInteropProxy GetProxy(IntPtr pItf, Type t)
        {
            Guid   iid_IUnknown = __ComObject.IID_IUnknown;
            IntPtr intPtr;
            int    errorCode = Marshal.QueryInterface(pItf, ref iid_IUnknown, out intPtr);

            Marshal.ThrowExceptionForHR(errorCode);
            ComInteropProxy comInteropProxy = ComInteropProxy.FindProxy(intPtr);

            if (comInteropProxy == null)
            {
                Marshal.Release(pItf);
                return(new ComInteropProxy(intPtr));
            }
            Marshal.Release(pItf);
            Interlocked.Increment(ref comInteropProxy.ref_count);
            return(comInteropProxy);
        }
All Usage Examples Of Mono.Interop.ComInteropProxy::FindProxy