public static unsafe IntPtr CreateWrapper()
 => (IntPtr)BlindAggregator.CreateInstance();
 public static unsafe IntPtr CreateWrapper()
 {
     return((IntPtr)BlindAggregator.CreateInstance());
 }
示例#3
0
 private static unsafe int GetGCHandlePtr(BlindAggregator* pThis, out IntPtr pResult)
 {
     pResult = pThis->_gcHandle;
     return S_OK;
 }
示例#4
0
            private static unsafe uint Release(BlindAggregator* pThis)
            {
                uint result = unchecked((uint)Interlocked.Decrement(ref pThis->_refCount));
                if (result == 0u)
                {
                    pThis->FinalRelease();
                    Marshal.FreeCoTaskMem((IntPtr)pThis);
                }

                return result;
            }
示例#5
0
 private static unsafe uint AddRef(BlindAggregator* pThis)
 {
     return unchecked((uint)Interlocked.Increment(ref pThis->_refCount));
 }
示例#6
0
 private static unsafe int QueryInterface(BlindAggregator* pThis, [In] ref Guid riid, out IntPtr pvObject)
 {
     if (riid == s_IUnknownInterfaceGuid || riid == s_IComWrapperGuid)
     {
         AddRef(pThis);
         pvObject = (IntPtr)pThis;
         return S_OK;
     }
     else if (riid == s_IMarshalInterfaceGuid)
     {
         pvObject = IntPtr.Zero;
         return E_NOINTERFACE;
     }
     else
     {
         // We don't know what the interface is, so aggregate blindly from here
         return Marshal.QueryInterface(pThis->_innerUnknown, ref riid, out pvObject);
     }
 }