Пример #1
0
            internal unsafe Vftbl(IntPtr ptr)
            {
                var vftblPtr = Marshal.PtrToStructure <VftblPtr>(ptr);
                var vftbl    = (IntPtr *)vftblPtr.Vftbl;

                IUnknownVftbl = Marshal.PtrToStructure <IUnknownVftbl>(vftblPtr.Vftbl);
                getBuffer     = Marshal.GetDelegateForFunctionPointer <GetBufferDelegate>(vftbl[3]);
            }
Пример #2
0
 static DefaultComWrappers()
 {
     GetIUnknownImpl(out var qi, out var addRef, out var release);
     IUnknownVftbl = new IUnknownVftbl
     {
         QueryInterface = Marshal.GetDelegateForFunctionPointer <IUnknownVftbl._QueryInterface>(qi),
         AddRef         = Marshal.GetDelegateForFunctionPointer <IUnknownVftbl._AddRef>(addRef),
         Release        = Marshal.GetDelegateForFunctionPointer <IUnknownVftbl._Release>(release),
     };
 }
Пример #3
0
 ObjectReference(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) :
     base(thisPtr)
 {
     _vftblIUnknown = vftblIUnknown;
     Vftbl          = vftblT;
 }
Пример #4
0
 static partial void PlatformSpecificInitialize()
 {
     IUnknownVftbl = WpfWinRTComWrappers.IUnknownVftbl;
 }