IRecordInfo
using System;
using System.CodeDom.Compiler;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Win32.Foundation;
using Windows.Win32.System.Com;
using Windows.Win32.System.Variant;
namespace Windows.Win32.System.Ole
{
[Guid("0000002F-0000-0000-C000-000000000046")]
[GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal struct IRecordInfo : IVTable<IRecordInfo, IRecordInfo.Vtbl>, IVTable, IComIID
{
internal struct Vtbl
{
internal IntPtr QueryInterface_1;
internal IntPtr AddRef_2;
internal IntPtr Release_3;
internal IntPtr RecordInit_4;
internal IntPtr RecordClear_5;
internal IntPtr RecordCopy_6;
internal IntPtr GetGuid_7;
internal IntPtr GetName_8;
internal IntPtr GetSize_9;
internal IntPtr GetTypeInfo_10;
internal IntPtr GetField_11;
internal IntPtr GetFieldNoCopy_12;
internal IntPtr PutField_13;
internal IntPtr PutFieldNoCopy_14;
internal IntPtr GetFieldNames_15;
internal IntPtr IsMatchingType_16;
internal IntPtr RecordCreate_17;
internal IntPtr RecordCreateCopy_18;
internal IntPtr RecordDestroy_19;
}
[ComImport]
[Guid("0000002F-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface Interface
{
[PreserveSig]
unsafe HRESULT RecordInit(void* pvNew);
[PreserveSig]
unsafe HRESULT RecordClear(void* pvExisting);
[PreserveSig]
unsafe HRESULT RecordCopy(void* pvExisting, void* pvNew);
[PreserveSig]
unsafe HRESULT GetGuid(Guid* pguid);
[PreserveSig]
unsafe HRESULT GetName(BSTR* pbstrName);
[PreserveSig]
unsafe HRESULT GetSize(uint* pcbSize);
[PreserveSig]
unsafe HRESULT GetTypeInfo(ITypeInfo** ppTypeInfo);
[PreserveSig]
unsafe HRESULT GetField(void* pvData, PCWSTR szFieldName, VARIANT* pvarField);
[PreserveSig]
unsafe HRESULT GetFieldNoCopy(void* pvData, PCWSTR szFieldName, VARIANT* pvarField, void** ppvDataCArray);
[PreserveSig]
unsafe HRESULT PutField(uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField);
[PreserveSig]
unsafe HRESULT PutFieldNoCopy(uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField);
[PreserveSig]
unsafe HRESULT GetFieldNames(uint* pcNames, BSTR* rgBstrNames);
[PreserveSig]
unsafe BOOL IsMatchingType(IRecordInfo* pRecordInfo);
[PreserveSig]
unsafe void* RecordCreate();
[PreserveSig]
unsafe HRESULT RecordCreateCopy(void* pvSource, void** ppvDest);
[PreserveSig]
unsafe HRESULT RecordDestroy(void* pvRecord);
}
private unsafe void** lpVtbl;
internal static readonly Guid IID_Guid = new Guid(47, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70);
[IsReadOnly]
static unsafe ref Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: IsReadOnly]
get {
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(new ReadOnlySpan<byte>(&global::<PrivateImplementationDetails>.956983314112529A3256F04B38F9B5ECD2BD5A4562A18FC55DB39A119900F92F, 16)));
}
}
internal unsafe HRESULT QueryInterface([In] [IsReadOnly] ref Guid riid, out void* ppvObject)
{
fixed (void** ppvObject2 = &ppvObject) {
fixed (Guid* riid2 = &riid) {
return QueryInterface(riid2, ppvObject2);
}
}
}
public unsafe HRESULT QueryInterface(Guid* riid, void** ppvObject)
{
IntPtr intPtr = (IntPtr)(*lpVtbl);
return (HRESULT);
}
public unsafe uint AddRef()
{
IntPtr intPtr = (IntPtr)lpVtbl[1];
return (uint);
}
public unsafe uint Release()
{
IntPtr intPtr = (IntPtr)lpVtbl[2];
return (uint);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT RecordInit(IRecordInfo* pThis, void* pvNew)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.RecordInit(pvNew);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT RecordInit(void* pvNew)
{
IntPtr intPtr = (IntPtr)lpVtbl[3];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT RecordClear(IRecordInfo* pThis, void* pvExisting)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.RecordClear(pvExisting);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT RecordClear(void* pvExisting)
{
IntPtr intPtr = (IntPtr)lpVtbl[4];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT RecordCopy(IRecordInfo* pThis, void* pvExisting, void* pvNew)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.RecordCopy(pvExisting, pvNew);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT RecordCopy(void* pvExisting, void* pvNew)
{
IntPtr intPtr = (IntPtr)lpVtbl[5];
return (HRESULT);
}
internal unsafe HRESULT GetGuid(out Guid pguid)
{
fixed (Guid* pguid2 = &pguid) {
return GetGuid(pguid2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetGuid(IRecordInfo* pThis, Guid* pguid)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetGuid(pguid);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetGuid(Guid* pguid)
{
IntPtr intPtr = (IntPtr)lpVtbl[6];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetName(IRecordInfo* pThis, BSTR* pbstrName)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetName(pbstrName);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetName(BSTR* pbstrName)
{
IntPtr intPtr = (IntPtr)lpVtbl[7];
return (HRESULT);
}
internal unsafe HRESULT GetSize(out uint pcbSize)
{
fixed (uint* pcbSize2 = &pcbSize) {
return GetSize(pcbSize2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetSize(IRecordInfo* pThis, uint* pcbSize)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetSize(pcbSize);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetSize(uint* pcbSize)
{
IntPtr intPtr = (IntPtr)lpVtbl[8];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetTypeInfo(IRecordInfo* pThis, ITypeInfo** ppTypeInfo)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetTypeInfo(ppTypeInfo);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetTypeInfo(ITypeInfo** ppTypeInfo)
{
IntPtr intPtr = (IntPtr)lpVtbl[9];
return (HRESULT);
}
internal unsafe HRESULT GetField(void* pvData, string szFieldName, out VARIANT pvarField)
{
fixed (VARIANT* pvarField2 = &pvarField) {
IntPtr intPtr;
if (szFieldName == null)
intPtr = (IntPtr)(void*)null;
else {
ref pinnableReference = ref szFieldName.GetPinnableReference();
intPtr = (IntPtr)(&pinnableReference);
}
char* value = (char*)(long)intPtr;
return GetField(pvData, value, pvarField2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetField(IRecordInfo* pThis, void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetField(pvData, szFieldName, pvarField);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetField(void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
IntPtr intPtr = (IntPtr)lpVtbl[10];
return (HRESULT);
}
internal unsafe HRESULT GetFieldNoCopy(void* pvData, string szFieldName, out VARIANT pvarField, out void* ppvDataCArray)
{
fixed (void** ppvDataCArray2 = &ppvDataCArray) {
fixed (VARIANT* pvarField2 = &pvarField) {
IntPtr intPtr;
if (szFieldName == null)
intPtr = (IntPtr)(void*)null;
else {
ref pinnableReference = ref szFieldName.GetPinnableReference();
intPtr = (IntPtr)(&pinnableReference);
}
char* value = (char*)(long)intPtr;
return GetFieldNoCopy(pvData, value, pvarField2, ppvDataCArray2);
}
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetFieldNoCopy(IRecordInfo* pThis, void* pvData, PCWSTR szFieldName, VARIANT* pvarField, void** ppvDataCArray)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetFieldNoCopy(pvData, szFieldName, pvarField, ppvDataCArray);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetFieldNoCopy(void* pvData, PCWSTR szFieldName, VARIANT* pvarField, void** ppvDataCArray)
{
IntPtr intPtr = (IntPtr)lpVtbl[11];
return (HRESULT);
}
internal unsafe HRESULT PutField(uint wFlags, void* pvData, string szFieldName, [In] [IsReadOnly] ref VARIANT pvarField)
{
fixed (VARIANT* pvarField2 = &pvarField) {
IntPtr intPtr;
if (szFieldName == null)
intPtr = (IntPtr)(void*)null;
else {
ref pinnableReference = ref szFieldName.GetPinnableReference();
intPtr = (IntPtr)(&pinnableReference);
}
char* value = (char*)(long)intPtr;
return PutField(wFlags, pvData, value, pvarField2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT PutField(IRecordInfo* pThis, uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.PutField(wFlags, pvData, szFieldName, pvarField);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT PutField(uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
IntPtr intPtr = (IntPtr)lpVtbl[12];
return (HRESULT);
}
internal unsafe HRESULT PutFieldNoCopy(uint wFlags, void* pvData, string szFieldName, [In] [IsReadOnly] ref VARIANT pvarField)
{
fixed (VARIANT* pvarField2 = &pvarField) {
IntPtr intPtr;
if (szFieldName == null)
intPtr = (IntPtr)(void*)null;
else {
ref pinnableReference = ref szFieldName.GetPinnableReference();
intPtr = (IntPtr)(&pinnableReference);
}
char* value = (char*)(long)intPtr;
return PutFieldNoCopy(wFlags, pvData, value, pvarField2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT PutFieldNoCopy(IRecordInfo* pThis, uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.PutFieldNoCopy(wFlags, pvData, szFieldName, pvarField);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT PutFieldNoCopy(uint wFlags, void* pvData, PCWSTR szFieldName, VARIANT* pvarField)
{
IntPtr intPtr = (IntPtr)lpVtbl[13];
return (HRESULT);
}
internal unsafe HRESULT GetFieldNames(ref uint pcNames, BSTR* rgBstrNames)
{
fixed (uint* pcNames2 = &pcNames) {
return GetFieldNames(pcNames2, rgBstrNames);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT GetFieldNames(IRecordInfo* pThis, uint* pcNames, BSTR* rgBstrNames)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.GetFieldNames(pcNames, rgBstrNames);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT GetFieldNames(uint* pcNames, BSTR* rgBstrNames)
{
IntPtr intPtr = (IntPtr)lpVtbl[14];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static BOOL IsMatchingType(IRecordInfo* pThis, IRecordInfo* pRecordInfo)
{
try {
ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out Interface object).ThrowOnFailure((IntPtr)0);
return object.IsMatchingType(pRecordInfo);
} catch (Exception exception) {
Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", exception);
throw;
}
}
public unsafe BOOL IsMatchingType(IRecordInfo* pRecordInfo)
{
IntPtr intPtr = (IntPtr)lpVtbl[15];
return (BOOL);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static void* RecordCreate(IRecordInfo* pThis)
{
try {
ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out Interface object).ThrowOnFailure((IntPtr)0);
return object.RecordCreate();
} catch (Exception exception) {
Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", exception);
throw;
}
}
public unsafe void* RecordCreate()
{
IntPtr intPtr = (IntPtr)lpVtbl[16];
return (void*);
}
internal unsafe HRESULT RecordCreateCopy(void* pvSource, out void* ppvDest)
{
fixed (void** ppvDest2 = &ppvDest) {
return RecordCreateCopy(pvSource, ppvDest2);
}
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT RecordCreateCopy(IRecordInfo* pThis, void* pvSource, void** ppvDest)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.RecordCreateCopy(pvSource, ppvDest);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT RecordCreateCopy(void* pvSource, void** ppvDest)
{
IntPtr intPtr = (IntPtr)lpVtbl[17];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT RecordDestroy(IRecordInfo* pThis, void* pvRecord)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IRecordInfo, Interface>(pThis, out object);
if (!result.Failed)
return object.RecordDestroy(pvRecord);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT RecordDestroy(void* pvRecord)
{
IntPtr intPtr = (IntPtr)lpVtbl[18];
return (HRESULT);
}
internal unsafe HRESULT QueryInterface<[IsUnmanaged] T>(out T* ppv) where T : struct
{
Guid riid = typeof(T).GUID;
void* ppvObject;
HRESULT result = QueryInterface(ref riid, out ppvObject);
if (result.Succeeded)
ppv = (T*)ppvObject;
else
ppv = null;
return result;
}
public unsafe static void PopulateVTable(Vtbl* vtable)
{
vtable->RecordInit_4 = (IntPtr)(void*);
vtable->RecordClear_5 = (IntPtr)(void*);
vtable->RecordCopy_6 = (IntPtr)(void*);
vtable->GetGuid_7 = (IntPtr)(void*);
vtable->GetName_8 = (IntPtr)(void*);
vtable->GetSize_9 = (IntPtr)(void*);
vtable->GetTypeInfo_10 = (IntPtr)(void*);
vtable->GetField_11 = (IntPtr)(void*);
vtable->GetFieldNoCopy_12 = (IntPtr)(void*);
vtable->PutField_13 = (IntPtr)(void*);
vtable->PutFieldNoCopy_14 = (IntPtr)(void*);
vtable->GetFieldNames_15 = (IntPtr)(void*);
vtable->IsMatchingType_16 = (IntPtr)(void*);
vtable->RecordCreate_17 = (IntPtr)(void*);
vtable->RecordCreateCopy_18 = (IntPtr)(void*);
vtable->RecordDestroy_19 = (IntPtr)(void*);
}
unsafe void IVTable<IRecordInfo, Vtbl>.PopulateVTable(Vtbl* vtable)
{
this.PopulateVTable(vtable);
}
}
}