static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, Initialize_0 = Do_Abi_Initialize_0 }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
public static object FromAbi(IntPtr ptr) { if (ptr == IntPtr.Zero) { return(null); } var vftblT = new Vftbl(ptr); var wrapper = new IReferenceArray <T>(ObjectReference <Vftbl> .FromAbi(ptr, vftblT)); return(wrapper.Value); }
static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = IUnknownVftbl.AbiToProjectionVftbl, GetIids = Do_Abi_GetIids, GetRuntimeClassName = Do_Abi_GetRuntimeClassName, GetTrustLevel = Do_Abi_GetTrustLevel }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, ActivateInstance_0 = Do_Abi_ActivateInstance_0 }; var nativeVftbl = (IntPtr *)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, BeginDraw = Do_Abi_BeginDraw, EndDraw = Do_Abi_EndDraw, Resize = Do_Abi_Resize }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, get_Buffer_0 = Do_Abi_get_Buffer_0 }; var nativeVftbl = (IntPtr *)Marshal.AllocCoTaskMem(Marshal.SizeOf <IUnknownVftbl>() + sizeof(IntPtr) * 12); Marshal.StructureToPtr(AbiToProjectionVftable.IUnknownVftbl, (IntPtr)nativeVftbl, false); nativeVftbl[3] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.get_Buffer_0); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, CreateCompositionSurfaceForHandle = Do_Abi_Create_Composition_Surface_For_Handle, CreateCompositionSurfaceForSwapChain = Do_Abi_Create_Composition_Surface_For_SwapChain, CreateGraphicsDevice = Do_Abi_Create_Graphics_Device }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, add_CanExecuteChanged_0 = Do_Abi_add_CanExecuteChanged_0, remove_CanExecuteChanged_1 = Do_Abi_remove_CanExecuteChanged_1, CanExecute_2 = Do_Abi_CanExecute_2, Execute_3 = Do_Abi_Execute_3 }; var nativeVftbl = (IntPtr *)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, GetUnmarshalClass_0 = Do_Abi_GetUnmarshalClass_0, GetMarshalSizeMax_1 = Do_Abi_GetMarshalSizeMax_1, MarshalInterface_2 = Do_Abi_MarshalInterface_2, UnmarshalInterface_3 = Do_Abi_UnmarshalInterface_3, ReleaseMarshalData_4 = Do_Abi_ReleaseMarshalData_4, DisconnectObject_5 = Do_Abi_DisconnectObject_5 }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
unsafe static Vftbl() { AbiToProjectionVftable = new Vftbl { IUnknownVftbl = global::WinRT.Interop.IUnknownVftbl.AbiToProjectionVftbl, GetEffectId = Do_Abi_Get_Effect_Id, GetNamedPropertyMapping = Do_Abi_Get_Property_Mapping, GetPropertyCount = Do_Abi_Get_Property_Count, GetProperty = Do_Abi_Get_Property, GetSource = Do_Abi_Get_Source, GetSourceCount = Do_Abi_Get_Source_Count }; AbiToProjectionVftablePtr = Marshal.AllocHGlobal(Marshal.SizeOf <Vftbl>()); Marshal.StructureToPtr(AbiToProjectionVftable, AbiToProjectionVftablePtr, false); }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, get_Type_0 = Do_Abi_get_Type_0, get_Name_1 = Do_Abi_get_Name_1, GetValue_2 = Do_Abi_GetValue_2, SetValue_3 = Do_Abi_SetValue_3, GetIndexedValue_4 = Do_Abi_GetIndexedValue_4, SetIndexedValue_5 = Do_Abi_SetIndexedValue_5, get_CanWrite_6 = Do_Abi_get_CanWrite_6, get_CanRead_7 = Do_Abi_get_CanRead_7 }; var nativeVftbl = (IntPtr *)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 8); Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, GetAt_0 = global::System.Delegate.CreateDelegate(GetAt_0_Type, typeof(Vftbl).GetMethod("Do_Abi_GetAt_0", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), get_Size_1 = Do_Abi_get_Size_1, IndexOf_2 = global::System.Delegate.CreateDelegate(IndexOf_2_Type, typeof(Vftbl).GetMethod("Do_Abi_IndexOf_2", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), GetMany_3 = Do_Abi_GetMany_3 }; var nativeVftbl = (IntPtr *)Marshal.AllocCoTaskMem(Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); nativeVftbl[6] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.GetAt_0); nativeVftbl[7] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.get_Size_1); nativeVftbl[8] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.IndexOf_2); nativeVftbl[9] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.GetMany_3); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, get_Type_0 = Marshal.GetFunctionPointerForDelegate(DelegateCache[0] = new ICustomProperty_Delegates.get_Type_0(Do_Abi_get_Type_0)).ToPointer(), get_Name_1 = Marshal.GetFunctionPointerForDelegate(DelegateCache[1] = new ICustomProperty_Delegates.get_Name_1(Do_Abi_get_Name_1)).ToPointer(), GetValue_2 = Marshal.GetFunctionPointerForDelegate(DelegateCache[2] = new ICustomProperty_Delegates.GetValue_2(Do_Abi_GetValue_2)).ToPointer(), SetValue_3 = Marshal.GetFunctionPointerForDelegate(DelegateCache[3] = new ICustomProperty_Delegates.SetValue_3(Do_Abi_SetValue_3)).ToPointer(), GetIndexedValue_4 = Marshal.GetFunctionPointerForDelegate(DelegateCache[4] = new ICustomProperty_Delegates.GetIndexedValue_4(Do_Abi_GetIndexedValue_4)).ToPointer(), SetIndexedValue_5 = Marshal.GetFunctionPointerForDelegate(DelegateCache[5] = new ICustomProperty_Delegates.SetIndexedValue_5(Do_Abi_SetIndexedValue_5)).ToPointer(), get_CanWrite_6 = Marshal.GetFunctionPointerForDelegate(DelegateCache[6] = new ICustomProperty_Delegates.get_CanWrite_6(Do_Abi_get_CanWrite_6)).ToPointer(), get_CanRead_7 = Marshal.GetFunctionPointerForDelegate(DelegateCache[7] = new ICustomProperty_Delegates.get_CanRead_7(Do_Abi_get_CanRead_7)).ToPointer(), }; var nativeVftbl = (IntPtr *)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 8); Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }
static unsafe Vftbl() { AbiToProjectionVftable = new Vftbl { IInspectableVftbl = global::WinRT.IInspectable.Vftbl.AbiToProjectionVftable, GetAt_0 = global::System.Delegate.CreateDelegate(GetAt_0_Type, typeof(Vftbl).GetMethod("Do_Abi_GetAt_0", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), get_Size_1 = Do_Abi_get_Size_1, GetView_2 = Do_Abi_GetView_2, IndexOf_3 = global::System.Delegate.CreateDelegate(IndexOf_3_Type, typeof(Vftbl).GetMethod("Do_Abi_IndexOf_3", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), SetAt_4 = global::System.Delegate.CreateDelegate(SetAt_4_Type, typeof(Vftbl).GetMethod("Do_Abi_SetAt_4", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), InsertAt_5 = global::System.Delegate.CreateDelegate(InsertAt_5_Type, typeof(Vftbl).GetMethod("Do_Abi_InsertAt_5", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), RemoveAt_6 = Do_Abi_RemoveAt_6, Append_7 = global::System.Delegate.CreateDelegate(Append_7_Type, typeof(Vftbl).GetMethod("Do_Abi_Append_7", BindingFlags.NonPublic | BindingFlags.Static).MakeGenericMethod(Marshaler <T> .AbiType)), RemoveAtEnd_8 = Do_Abi_RemoveAtEnd_8, Clear_9 = Do_Abi_Clear_9, GetMany_10 = Do_Abi_GetMany_10, ReplaceAll_11 = Do_Abi_ReplaceAll_11 }; var nativeVftbl = (IntPtr *)Marshal.AllocCoTaskMem(Marshal.SizeOf <global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 12); Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); nativeVftbl[6] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.GetAt_0); nativeVftbl[7] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.get_Size_1); nativeVftbl[8] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.GetView_2); nativeVftbl[9] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.IndexOf_3); nativeVftbl[10] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.SetAt_4); nativeVftbl[11] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.InsertAt_5); nativeVftbl[12] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.RemoveAt_6); nativeVftbl[13] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.Append_7); nativeVftbl[14] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.RemoveAtEnd_8); nativeVftbl[15] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.Clear_9); nativeVftbl[16] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.GetMany_10); nativeVftbl[17] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.ReplaceAll_11); AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; }