|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
namespace System.Ole
{
[Guid("0000002F-0000-0000-C000-000000000046")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IRecordInfo
:IVTable<IRecordInfo,IRecordInfo.Vtbl>,IComIID {
/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
{
fixed (void** ppvObjectLocal = &ppvObject)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal);
return __result;
}
}
}
public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IRecordInfo*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint>)lpVtbl[1])((IRecordInfo*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint>)lpVtbl[2])((IRecordInfo*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RecordInit(IRecordInfo* pThis, void* pvNew)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RecordInit(pvNew);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Initializes a new instance of a record.</summary>
/// <param name="pvNew">An instance of a record.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The caller must allocate the memory of the record by its appropriate size using the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-getsize">GetSize</a> method. <b>RecordInit</b> sets all contents of the record to 0 and the record should hold no resources.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-recordinit#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT RecordInit(void* pvNew)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IRecordInfo*)Unsafe.AsPointer(ref this), pvNew);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RecordClear(IRecordInfo* pThis, void* pvExisting)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RecordClear(pvExisting);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Releases object references and other values of a record without deallocating the record.</summary>
/// <param name="pvExisting">The record to be cleared.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks><b>RecordClear</b> releases memory blocks held by VT_PTR or VT_SAFEARRAY instance fields. The caller needs to free the instance fields memory, <b>RecordClear</b> will do nothing if there are no resources held.</remarks>
public unsafe winmdroot.Foundation.HRESULT RecordClear(void* pvExisting)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IRecordInfo*)Unsafe.AsPointer(ref this), pvExisting);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RecordCopy(IRecordInfo* pThis, void* pvExisting, void* pvNew)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RecordCopy(pvExisting, pvNew);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Copies an existing record into the passed in buffer.</summary>
/// <param name="pvExisting">The current record instance.</param>
/// <param name="pvNew">The destination where the record will be copied.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks><b>RecordCopy</b> will release the resources in the destination first. The caller is responsible for allocating sufficient memory in the destination by calling <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-getsize">GetSize</a> or <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recordcreate">RecordCreate</a>. If <b>RecordCopy</b> fails to copy any of the fields then all fields will be cleared, as though <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recordclear">RecordClear</a> had been called.</remarks>
public unsafe winmdroot.Foundation.HRESULT RecordCopy(void* pvExisting, void* pvNew)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,void* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IRecordInfo*)Unsafe.AsPointer(ref this), pvExisting, pvNew);
}
/// <inheritdoc cref="GetGuid(global::System.Guid*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetGuid(out global::System.Guid pguid)
{
fixed (global::System.Guid* pguidLocal = &pguid)
{
winmdroot.Foundation.HRESULT __result = this.GetGuid(pguidLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetGuid(IRecordInfo* pThis, global::System.Guid* pguid)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetGuid(pguid);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the GUID of the record type.</summary>
/// <param name="pguid">The class GUID of the TypeInfo that describes the UDT.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getguid">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetGuid(global::System.Guid* pguid)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IRecordInfo*)Unsafe.AsPointer(ref this), pguid);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetName(IRecordInfo* pThis, winmdroot.Foundation.BSTR* pbstrName)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetName(pbstrName);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the name of the record type.</summary>
/// <param name="pbstrName">The name.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The caller must free the BSTR by calling <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysfreestring">SysFreeString</a>.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetName(winmdroot.Foundation.BSTR* pbstrName)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IRecordInfo*)Unsafe.AsPointer(ref this), pbstrName);
}
/// <inheritdoc cref="GetSize(uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetSize(out uint pcbSize)
{
fixed (uint* pcbSizeLocal = &pcbSize)
{
winmdroot.Foundation.HRESULT __result = this.GetSize(pcbSizeLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetSize(IRecordInfo* pThis, uint* pcbSize)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetSize(pcbSize);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the number of bytes of memory necessary to hold the record instance.</summary>
/// <param name="pcbSize">The size of a record instance, in bytes.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getsize">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetSize(uint* pcbSize)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IRecordInfo*)Unsafe.AsPointer(ref this), pcbSize);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetTypeInfo(IRecordInfo* pThis, winmdroot.System.Com.ITypeInfo** ppTypeInfo)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetTypeInfo(ppTypeInfo);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the type information that describes a UDT or safearray of UDTs.</summary>
/// <param name="ppTypeInfo">The information type of the record.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks><b>AddRef</b> is called on the pointer <i>ppTypeInfo</i>.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetTypeInfo(winmdroot.System.Com.ITypeInfo** ppTypeInfo)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IRecordInfo*)Unsafe.AsPointer(ref this), ppTypeInfo);
}
/// <inheritdoc cref="GetField(void*, winmdroot.Foundation.PCWSTR, winmdroot.System.Variant.VARIANT*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetField(void* pvData, string szFieldName, out winmdroot.System.Variant.VARIANT pvarField)
{
fixed (winmdroot.System.Variant.VARIANT* pvarFieldLocal = &pvarField)
{
fixed (char* szFieldNameLocal = szFieldName)
{
winmdroot.Foundation.HRESULT __result = this.GetField(pvData, szFieldNameLocal, pvarFieldLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetField(IRecordInfo* pThis, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetField(pvData, szFieldName, pvarField);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a pointer to the VARIANT containing the value of a given field name.</summary>
/// <param name="pvData">The instance of a record.</param>
/// <param name="szFieldName">The field name.</param>
/// <param name="pvarField">The VARIANT that you want to hold the value of the field name, <i>szFieldName</i>. On return, places a copy of the field's value in the variant.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The VARIANT that you pass in contains a copy of the field's value upon return. If you modify the VARIANT then the underlying record field does not change. The caller allocates memory of the VARIANT. The method <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-variantclear">VariantClear</a> is called for <i>pvarField</i> before copying.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getfield#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetField(void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IRecordInfo*)Unsafe.AsPointer(ref this), pvData, szFieldName, pvarField);
}
/// <inheritdoc cref="GetFieldNoCopy(void*, winmdroot.Foundation.PCWSTR, winmdroot.System.Variant.VARIANT*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT GetFieldNoCopy(void* pvData, string szFieldName, out winmdroot.System.Variant.VARIANT pvarField, out void* ppvDataCArray)
{
fixed (void** ppvDataCArrayLocal = &ppvDataCArray)
{
fixed (winmdroot.System.Variant.VARIANT* pvarFieldLocal = &pvarField)
{
fixed (char* szFieldNameLocal = szFieldName)
{
winmdroot.Foundation.HRESULT __result = this.GetFieldNoCopy(pvData, szFieldNameLocal, pvarFieldLocal, ppvDataCArrayLocal);
return __result;
}
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetFieldNoCopy(IRecordInfo* pThis, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField, void** ppvDataCArray)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetFieldNoCopy(pvData, szFieldName, pvarField, ppvDataCArray);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a pointer to the value of a given field name without copying the value and allocating resources.</summary>
/// <param name="pvData">The instance of a record.</param>
/// <param name="szFieldName">The name of the field.</param>
/// <param name="pvarField">The VARIANT that will contain the UDT upon return.</param>
/// <param name="ppvDataCArray">Receives the value of the field upon return.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Upon return, the VARIANT you pass contains a direct pointer to the record's field, <i>ppvDataCArray</i>. If you modify the VARIANT, then the underlying record field will change. The caller allocates memory of the VARIANT, but does not own the memory so cannot free <i>pvarField</i>. This method calls <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-variantclear">VariantClear</a> for <i>pvarField</i> before filling in the requested field.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getfieldnocopy#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetFieldNoCopy(void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField, void** ppvDataCArray)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IRecordInfo*)Unsafe.AsPointer(ref this), pvData, szFieldName, pvarField, ppvDataCArray);
}
/// <inheritdoc cref="PutField(uint, void*, winmdroot.Foundation.PCWSTR, winmdroot.System.Variant.VARIANT*)"/>
internal unsafe winmdroot.Foundation.HRESULT PutField(uint wFlags, void* pvData, string szFieldName, in winmdroot.System.Variant.VARIANT pvarField)
{
fixed (winmdroot.System.Variant.VARIANT* pvarFieldLocal = &pvarField)
{
fixed (char* szFieldNameLocal = szFieldName)
{
winmdroot.Foundation.HRESULT __result = this.PutField(wFlags, pvData, szFieldNameLocal, pvarFieldLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT PutField(IRecordInfo* pThis, uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.PutField(wFlags, pvData, szFieldName, pvarField);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Puts a variant into a field.</summary>
/// <param name="wFlags">
/// <para>The only legal values for the wFlags parameter is INVOKE_PROPERTYPUT or INVOKE_PROPERTYPUTREF. If INVOKE_PROPERTYPUTREF is passed in then <b>PutField</b> just assigns the value of the variant that is passed in to the field using normal coercion rules. If INVOKE_PROPERTYPUT is passed in then specific rules apply. If the field is declared as a class that derives from <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-idispatch">IDispatch</a> and the field's value is NULL then an error will be returned. If the field's value is not NULL then the variant will be passed to the default property supported by the object referenced by the field. If the field is not declared as a class derived from <b>IDispatch</b> then an error will be returned. If the field is declared as a variant of type VT_Dispatch then the default value of the object is assigned to the field. Otherwise, the variant's value is assigned to the field.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-putfield#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pvData">The pointer to an instance of the record.</param>
/// <param name="szFieldName">The name of the field of the record.</param>
/// <param name="pvarField">The pointer to the variant.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-putfield">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT PutField(uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint ,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((IRecordInfo*)Unsafe.AsPointer(ref this), wFlags, pvData, szFieldName, pvarField);
}
/// <inheritdoc cref="PutFieldNoCopy(uint, void*, winmdroot.Foundation.PCWSTR, winmdroot.System.Variant.VARIANT*)"/>
internal unsafe winmdroot.Foundation.HRESULT PutFieldNoCopy(uint wFlags, void* pvData, string szFieldName, in winmdroot.System.Variant.VARIANT pvarField)
{
fixed (winmdroot.System.Variant.VARIANT* pvarFieldLocal = &pvarField)
{
fixed (char* szFieldNameLocal = szFieldName)
{
winmdroot.Foundation.HRESULT __result = this.PutFieldNoCopy(wFlags, pvData, szFieldNameLocal, pvarFieldLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT PutFieldNoCopy(IRecordInfo* pThis, uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.PutFieldNoCopy(wFlags, pvData, szFieldName, pvarField);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Passes ownership of the data to the assigned field by placing the actual data into the field.</summary>
/// <param name="wFlags">The only legal values for the wFlags parameter is INVOKE_PROPERTYPUT or INVOKE_PROPERTYPUTREF.</param>
/// <param name="pvData">An instance of the record described by <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-irecordinfo">IRecordInfo</a>.</param>
/// <param name="szFieldName">The name of the field of the record.</param>
/// <param name="pvarField">The variant to be put into the field.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-putfieldnocopy">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT PutFieldNoCopy(uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint ,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((IRecordInfo*)Unsafe.AsPointer(ref this), wFlags, pvData, szFieldName, pvarField);
}
/// <inheritdoc cref="GetFieldNames(uint*, winmdroot.Foundation.BSTR*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetFieldNames(ref uint pcNames, winmdroot.Foundation.BSTR* rgBstrNames)
{
fixed (uint* pcNamesLocal = &pcNames)
{
winmdroot.Foundation.HRESULT __result = this.GetFieldNames(pcNamesLocal, rgBstrNames);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetFieldNames(IRecordInfo* pThis, uint* pcNames, winmdroot.Foundation.BSTR* rgBstrNames)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetFieldNames(pcNames, rgBstrNames);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the names of the fields of the record.</summary>
/// <param name="pcNames">The number of names to return.</param>
/// <param name="rgBstrNames">
/// <para>The name of the array of type BSTR. If the <i>rgBstrNames</i> parameter is NULL, then <i>pcNames</i> is returned with the number of field names. It the <i>rgBstrNames</i> parameter is not NULL, then the string names contained in <i>rgBstrNames</i> are returned. If the number of names in <i>pcNames</i> and <i>rgBstrNames</i> are not equal then the lesser number of the two is the number of returned field names. The caller needs to free the BSTRs inside the array returned in <i>rgBstrNames</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getfieldnames#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The caller should allocate memory for the array of BSTRs. If the array is larger than needed, set the unused portion to 0. On return, the caller will need to free each contained BSTR using <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysfreestring">SysFreeString</a>. In case of out of memory, <i>pcNames</i> points to error code.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-getfieldnames#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetFieldNames(uint* pcNames, winmdroot.Foundation.BSTR* rgBstrNames)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,uint* ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((IRecordInfo*)Unsafe.AsPointer(ref this), pcNames, rgBstrNames);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.BOOL IsMatchingType(IRecordInfo* pThis, winmdroot.System.Ole.IRecordInfo* pRecordInfo)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
return __object.IsMatchingType(pRecordInfo);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Determines whether the record that is passed in matches that of the current record information.</summary>
/// <param name="pRecordInfo">The information of the record.</param>
/// <returns>
/// <para></para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-ismatchingtype">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.BOOL IsMatchingType(winmdroot.System.Ole.IRecordInfo* pRecordInfo)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.System.Ole.IRecordInfo* ,winmdroot.Foundation.BOOL>)lpVtbl[15])((IRecordInfo*)Unsafe.AsPointer(ref this), pRecordInfo);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void* RecordCreate(IRecordInfo* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
return __object.RecordCreate();
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Allocates memory for a new record, initializes the instance and returns a pointer to the record.</summary>
/// <returns>This method returns a pointer to the created record.</returns>
/// <remarks>
/// <para>The memory is set to zeros before it is returned. The records created must be freed by calling <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recorddestroy">RecordDestroy</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-recordcreate#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void* RecordCreate()
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void*>)lpVtbl[16])((IRecordInfo*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="RecordCreateCopy(void*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT RecordCreateCopy(void* pvSource, out void* ppvDest)
{
fixed (void** ppvDestLocal = &ppvDest)
{
winmdroot.Foundation.HRESULT __result = this.RecordCreateCopy(pvSource, ppvDestLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RecordCreateCopy(IRecordInfo* pThis, void* pvSource, void** ppvDest)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RecordCreateCopy(pvSource, ppvDest);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Creates a copy of an instance of a record to the specified location.</summary>
/// <param name="pvSource">An instance of the record to be copied.</param>
/// <param name="ppvDest">The new record with data copied from <i>pvSource</i>.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The records created must be freed by calling <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recorddestroy">RecordDestroy</a>.</remarks>
public unsafe winmdroot.Foundation.HRESULT RecordCreateCopy(void* pvSource, void** ppvDest)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[17])((IRecordInfo*)Unsafe.AsPointer(ref this), pvSource, ppvDest);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT RecordDestroy(IRecordInfo* pThis, void* pvRecord)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.RecordDestroy(pvRecord);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Releases the resources and deallocates the memory of the record.</summary>
/// <param name="pvRecord">An instance of the record to be destroyed.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recordclear">RecordClear</a> is called to release the resources held by the instance of a record without deallocating memory. <div class="alert"><b>Note</b> This method can only be called on records allocated through <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recordcreate">RecordCreate</a> and <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-recordcreatecopy">RecordCreateCopy</a>. If you allocate the record yourself, you cannot call this method.</div> <div> </div></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-irecordinfo-recorddestroy#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT RecordDestroy(void* pvRecord)
{
return ((delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT>)lpVtbl[18])((IRecordInfo*)Unsafe.AsPointer(ref this), pvRecord);
}
internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged
{
var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
if (hr.Succeeded)
{
ppv = (T*)pv;
}
else
{
ppv = null;
}
return hr;
}
internal struct Vtbl
{
internal delegate *unmanaged [Stdcall]<IRecordInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT> RecordInit_4;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT> RecordClear_5;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,void* ,winmdroot.Foundation.HRESULT> RecordCopy_6;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT> GetGuid_7;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetName_8;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint* ,winmdroot.Foundation.HRESULT> GetSize_9;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetTypeInfo_10;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> GetField_11;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,void** ,winmdroot.Foundation.HRESULT> GetFieldNoCopy_12;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint ,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> PutField_13;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint ,void* ,winmdroot.Foundation.PCWSTR ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> PutFieldNoCopy_14;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,uint* ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetFieldNames_15;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,winmdroot.System.Ole.IRecordInfo* ,winmdroot.Foundation.BOOL> IsMatchingType_16;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void*> RecordCreate_17;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,void** ,winmdroot.Foundation.HRESULT> RecordCreateCopy_18;
internal delegate *unmanaged [Stdcall]<IRecordInfo*,void* ,winmdroot.Foundation.HRESULT> RecordDestroy_19;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->RecordInit_4 = &RecordInit;
vtable->RecordClear_5 = &RecordClear;
vtable->RecordCopy_6 = &RecordCopy;
vtable->GetGuid_7 = &GetGuid;
vtable->GetName_8 = &GetName;
vtable->GetSize_9 = &GetSize;
vtable->GetTypeInfo_10 = &GetTypeInfo;
vtable->GetField_11 = &GetField;
vtable->GetFieldNoCopy_12 = &GetFieldNoCopy;
vtable->PutField_13 = &PutField;
vtable->PutFieldNoCopy_14 = &PutFieldNoCopy;
vtable->GetFieldNames_15 = &GetFieldNames;
vtable->IsMatchingType_16 = &IsMatchingType;
vtable->RecordCreate_17 = &RecordCreate;
vtable->RecordCreateCopy_18 = &RecordCreateCopy;
vtable->RecordDestroy_19 = &RecordDestroy;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{0000002f-0000-0000-c000-000000000046}</value>
internal static readonly Guid IID_Guid = new Guid(0x0000002F, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x2F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("0000002F-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT RecordInit(void* pvNew);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT RecordClear(void* pvExisting);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT RecordCopy(void* pvExisting, void* pvNew);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetGuid(global::System.Guid* pguid);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetName(winmdroot.Foundation.BSTR* pbstrName);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetSize(uint* pcbSize);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetTypeInfo(winmdroot.System.Com.ITypeInfo** ppTypeInfo);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetField(void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetFieldNoCopy(void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField, void** ppvDataCArray);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT PutField(uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT PutFieldNoCopy(uint wFlags, void* pvData, winmdroot.Foundation.PCWSTR szFieldName, winmdroot.System.Variant.VARIANT* pvarField);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetFieldNames(uint* pcNames, winmdroot.Foundation.BSTR* rgBstrNames);
[PreserveSig()]
unsafe winmdroot.Foundation.BOOL IsMatchingType(winmdroot.System.Ole.IRecordInfo* pRecordInfo);
[PreserveSig()]
unsafe void* RecordCreate();
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT RecordCreateCopy(void* pvSource, void** ppvDest);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT RecordDestroy(void* pvRecord);
}
}
}
}
|