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]); }
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), }; }
ObjectReference(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) : base(thisPtr) { _vftblIUnknown = vftblIUnknown; Vftbl = vftblT; }
static partial void PlatformSpecificInitialize() { IUnknownVftbl = WpfWinRTComWrappers.IUnknownVftbl; }