|
// ------------------------------------------------------------------------------
// <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.Com
{
[Guid("00020401-0000-0000-C000-000000000046")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct ITypeInfo
:IVTable<ITypeInfo,ITypeInfo.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]<ITypeInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ITypeInfo*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint>)lpVtbl[1])((ITypeInfo*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint>)lpVtbl[2])((ITypeInfo*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="GetTypeAttr(winmdroot.System.Com.TYPEATTR**)"/>
internal unsafe winmdroot.Foundation.HRESULT GetTypeAttr(out winmdroot.System.Com.TYPEATTR* ppTypeAttr)
{
fixed (winmdroot.System.Com.TYPEATTR** ppTypeAttrLocal = &ppTypeAttr)
{
winmdroot.Foundation.HRESULT __result = this.GetTypeAttr(ppTypeAttrLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetTypeAttr(ITypeInfo* pThis, winmdroot.System.Com.TYPEATTR** ppTypeAttr)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetTypeAttr(ppTypeAttr);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a TYPEATTR structure that contains the attributes of the type description.</summary>
/// <param name="ppTypeAttr">The attributes of this type description.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>To free the TYPEATTR structure, use <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-releasetypeattr">ITypeInfo::ReleaseTypeAttr</a>.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetTypeAttr(winmdroot.System.Com.TYPEATTR** ppTypeAttr)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.TYPEATTR** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ITypeInfo*)Unsafe.AsPointer(ref this), ppTypeAttr);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetTypeComp(ITypeInfo* pThis, winmdroot.System.Com.ITypeComp** ppTComp)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetTypeComp(ppTComp);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the ITypeComp interface for the type description, which enables a client compiler to bind to the type description's members.</summary>
/// <param name="ppTComp">The <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-itypecomp">ITypeComp</a> of the containing type library.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>A client compiler can use the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-itypecomp">ITypeComp</a> interface to bind to members of the type.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetTypeComp(winmdroot.System.Com.ITypeComp** ppTComp)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.ITypeComp** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((ITypeInfo*)Unsafe.AsPointer(ref this), ppTComp);
}
/// <inheritdoc cref="GetFuncDesc(uint, winmdroot.System.Com.FUNCDESC**)"/>
internal unsafe winmdroot.Foundation.HRESULT GetFuncDesc(uint index, out winmdroot.System.Com.FUNCDESC* ppFuncDesc)
{
fixed (winmdroot.System.Com.FUNCDESC** ppFuncDescLocal = &ppFuncDesc)
{
winmdroot.Foundation.HRESULT __result = this.GetFuncDesc(index, ppFuncDescLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetFuncDesc(ITypeInfo* pThis, uint index, winmdroot.System.Com.FUNCDESC** ppFuncDesc)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetFuncDesc(index, ppFuncDesc);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the FUNCDESC structure that contains information about a specified function.</summary>
/// <param name="index">The index of the function whose description is to be returned. The <i>index</i> should be in the range of 0 to 1 less than the number of functions in this type.</param>
/// <param name="ppFuncDesc">A FUNCDESC structure that describes the specified function.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The function <b>ITypeInfo::GetFuncDesc</b> provides access to a FUNCDESC structure that describes the function with the specified <i>index</i>. The FUNCDESC structure should be freed with <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-releasefuncdesc">ITypeInfo::ReleaseFuncDesc</a>. The number of functions in the type is one of the attributes contained in the TYPEATTR structure.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetFuncDesc(uint index, winmdroot.System.Com.FUNCDESC** ppFuncDesc)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.FUNCDESC** ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((ITypeInfo*)Unsafe.AsPointer(ref this), index, ppFuncDesc);
}
/// <inheritdoc cref="GetVarDesc(uint, winmdroot.System.Com.VARDESC**)"/>
internal unsafe winmdroot.Foundation.HRESULT GetVarDesc(uint index, out winmdroot.System.Com.VARDESC* ppVarDesc)
{
fixed (winmdroot.System.Com.VARDESC** ppVarDescLocal = &ppVarDesc)
{
winmdroot.Foundation.HRESULT __result = this.GetVarDesc(index, ppVarDescLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetVarDesc(ITypeInfo* pThis, uint index, winmdroot.System.Com.VARDESC** ppVarDesc)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetVarDesc(index, ppVarDesc);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a VARDESC structure that describes the specified variable.</summary>
/// <param name="index">The index of the variable whose description is to be returned. The index should be in the range of 0 to 1 less than the number of variables in this type.</param>
/// <param name="ppVarDesc">A VARDESC that describes the specified variable.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>To free the VARDESC structure, use <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-releasevardesc">ReleaseVarDesc</a>.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetVarDesc(uint index, winmdroot.System.Com.VARDESC** ppVarDesc)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.VARDESC** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((ITypeInfo*)Unsafe.AsPointer(ref this), index, ppVarDesc);
}
/// <inheritdoc cref="GetNames(int, winmdroot.Foundation.BSTR*, uint, uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetNames(int memid, winmdroot.Foundation.BSTR* rgBstrNames, uint cMaxNames, out uint pcNames)
{
fixed (uint* pcNamesLocal = &pcNames)
{
winmdroot.Foundation.HRESULT __result = this.GetNames(memid, rgBstrNames, cMaxNames, pcNamesLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetNames(ITypeInfo* pThis, int memid, winmdroot.Foundation.BSTR* rgBstrNames, uint cMaxNames, uint* pcNames)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetNames(memid, rgBstrNames, cMaxNames, pcNames);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the variable with the specified member ID or the name of the property or method and the parameters that correspond to the specified function ID.</summary>
/// <param name="memid">The ID of the member whose name (or names) is to be returned.</param>
/// <param name="rgBstrNames">The caller-allocated array. On return, each of the elements contains the name (or names) associated with the member.</param>
/// <param name="cMaxNames">The length of the passed-in <i>rgBstrNames</i> array.</param>
/// <param name="pcNames">The number of names in the <i>rgBstrNames</i> array.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The caller must release the returned BSTR array.</para>
/// <para>If the member ID identifies a property that is implemented with property functions, the property name is returned. For property get functions, the names of the function and its parameters are always returned.</para>
/// <para>For property put and put reference functions, the right side of the assignment is unnamed. If <i>cMaxNames</i> is less than is required to return all of the names of the parameters of a function, then only the names of the first <i>cMaxNames</i> - 1 parameters are returned. The names of the parameters are returned in the array in the same order that they appear elsewhere in the interface (for example, the same order in the parameter array associated with the FUNCDESC enumeration).</para>
/// <para>If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getnames#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetNames(int memid, winmdroot.Foundation.BSTR* rgBstrNames, uint cMaxNames, uint* pcNames)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,uint ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((ITypeInfo*)Unsafe.AsPointer(ref this), memid, rgBstrNames, cMaxNames, pcNames);
}
/// <inheritdoc cref="GetRefTypeOfImplType(uint, uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetRefTypeOfImplType(uint index, out uint pRefType)
{
fixed (uint* pRefTypeLocal = &pRefType)
{
winmdroot.Foundation.HRESULT __result = this.GetRefTypeOfImplType(index, pRefTypeLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetRefTypeOfImplType(ITypeInfo* pThis, uint index, uint* pRefType)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetRefTypeOfImplType(index, pRefType);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>If a type description describes a COM class, it retrieves the type description of the implemented interface types.</summary>
/// <param name="index">The index of the implemented type whose handle is returned. The valid range is 0 to the <b>cImplTypes</b> field in the TYPEATTR structure.</param>
/// <param name="pRefType">A handle for the implemented interface (if any). This handle can be passed to <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-getreftypeinfo">ITypeInfo::GetRefTypeInfo</a> to get the type description.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>If the TKIND_DISPATCH type description is for a dual interface, the TKIND_INTERFACE type description can be obtained by calling <b>GetRefTypeOfImplType</b> with an <i>index</i> of –1, and by passing the returned <i>pRefTypehandle</i> to <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-getreftypeinfo">GetRefTypeInfo</a> to retrieve the type information.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetRefTypeOfImplType(uint index, uint* pRefType)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((ITypeInfo*)Unsafe.AsPointer(ref this), index, pRefType);
}
/// <inheritdoc cref="GetImplTypeFlags(uint, winmdroot.System.Com.IMPLTYPEFLAGS*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetImplTypeFlags(uint index, out winmdroot.System.Com.IMPLTYPEFLAGS pImplTypeFlags)
{
fixed (winmdroot.System.Com.IMPLTYPEFLAGS* pImplTypeFlagsLocal = &pImplTypeFlags)
{
winmdroot.Foundation.HRESULT __result = this.GetImplTypeFlags(index, pImplTypeFlagsLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetImplTypeFlags(ITypeInfo* pThis, uint index, winmdroot.System.Com.IMPLTYPEFLAGS* pImplTypeFlags)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetImplTypeFlags(index, pImplTypeFlags);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface or base interface in a type description.</summary>
/// <param name="index">The index of the implemented interface or base interface for which to get the flags.</param>
/// <param name="pImplTypeFlags">The IMPLTYPEFLAGS enumeration value.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The flags are associated with the act of inheritance, and not with the inherited interface.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetImplTypeFlags(uint index, winmdroot.System.Com.IMPLTYPEFLAGS* pImplTypeFlags)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.IMPLTYPEFLAGS* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((ITypeInfo*)Unsafe.AsPointer(ref this), index, pImplTypeFlags);
}
/// <inheritdoc cref="GetIDsOfNames(winmdroot.Foundation.PWSTR*, uint, int*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetIDsOfNames(ReadOnlySpan<winmdroot.Foundation.PWSTR> rgszNames, Span<int> pMemId)
{
fixed (int* pMemIdLocal = pMemId)
{
fixed (winmdroot.Foundation.PWSTR* rgszNamesLocal = rgszNames)
{
if (rgszNames.Length != pMemId.Length) throw new ArgumentException();
winmdroot.Foundation.HRESULT __result = this.GetIDsOfNames(rgszNamesLocal, (uint )pMemId.Length, pMemIdLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetIDsOfNames(ITypeInfo* pThis, winmdroot.Foundation.PWSTR* rgszNames, uint cNames, int* pMemId)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetIDsOfNames(rgszNames, cNames, pMemId);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Maps between member names and member IDs, and parameter names and parameter IDs.</summary>
/// <param name="rgszNames">An array of names to be mapped.</param>
/// <param name="cNames">The count of the names to be mapped.</param>
/// <param name="pMemId">Caller-allocated array in which name mappings are placed.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The function <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-getidsofnames">GetIDsOfNames</a> maps the name of a member (<b>rgszNames</b>[0]) and its parameters (<b>rgszNames</b>[1] ...<b>rgszNames</b>[<b>cNames</b>- 1]) to the ID of the member (<b>pMemId</b>[0]), and to the IDs of the specified parameters (<b>pMemId</b>[1] ... <b>pMemId</b>[<b>cNames</b>- 1]). The IDs of parameters are 0 for the first parameter in the member function's argument list, 1 for the second, and so on.</para>
/// <para>If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getidsofnames#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetIDsOfNames(winmdroot.Foundation.PWSTR* rgszNames, uint cNames, int* pMemId)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.Foundation.PWSTR* ,uint ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((ITypeInfo*)Unsafe.AsPointer(ref this), rgszNames, cNames, pMemId);
}
/// <inheritdoc cref="Invoke(void*, int, winmdroot.System.Com.DISPATCH_FLAGS, winmdroot.System.Com.DISPPARAMS*, winmdroot.System.Variant.VARIANT*, winmdroot.System.Com.EXCEPINFO*, uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT Invoke(void* pvInstance, int memid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, ref winmdroot.System.Com.DISPPARAMS pDispParams, out winmdroot.System.Variant.VARIANT pVarResult, out winmdroot.System.Com.EXCEPINFO pExcepInfo, out uint puArgErr)
{
fixed (uint* puArgErrLocal = &puArgErr)
{
fixed (winmdroot.System.Com.EXCEPINFO* pExcepInfoLocal = &pExcepInfo)
{
fixed (winmdroot.System.Variant.VARIANT* pVarResultLocal = &pVarResult)
{
fixed (winmdroot.System.Com.DISPPARAMS* pDispParamsLocal = &pDispParams)
{
winmdroot.Foundation.HRESULT __result = this.Invoke(pvInstance, memid, wFlags, pDispParamsLocal, pVarResultLocal, pExcepInfoLocal, puArgErrLocal);
return __result;
}
}
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Invoke(ITypeInfo* pThis, void* pvInstance, int memid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, winmdroot.System.Com.DISPPARAMS* pDispParams, winmdroot.System.Variant.VARIANT* pVarResult, winmdroot.System.Com.EXCEPINFO* pExcepInfo, uint* puArgErr)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Invoke(pvInstance, memid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Invokes a method, or accesses a property of an object, that implements the interface described by the type description.</summary>
/// <param name="pvInstance">An instance of the interface described by this type description.</param>
/// <param name="memid">The interface member.</param>
/// <param name="wFlags">
/// <para>Flags describing the context of the invoke call. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-invoke#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDispParams">An array of arguments, an array of DISPIDs for named arguments, and counts of the number of elements in each array.</param>
/// <param name="pVarResult">The result. Should be null if the caller does not expect any result. If <i>wFlags</i> specifies DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF, <i>pVarResultis</i> is ignored.</param>
/// <param name="pExcepInfo">An exception information structure, which is filled in only if DISP_E_EXCEPTION is returned. If <i>pExcepInfo</i> is null on input, only an HRESULT error will be returned.</param>
/// <param name="puArgErr">If Invoke returns DISP_E_TYPEMISMATCH, <i>puArgErr</i> indicates the index (within <i>rgvarg</i>) of the argument with incorrect type. If more than one argument returns an error, <i>puArgErr</i> indicates only the first argument with an error. Arguments in pDispParams->rgvarg appear in reverse order, so the first argument is the one having the highest index in the array. This parameter cannot be null.</param>
/// <returns>
/// <para></para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Use the function <b>ITypeInfo::Invoke</b> to access a member of an object or invoke a method that implements the interface described by this type description. For objects that support the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-idispatch">IDispatch</a> interface, you can use <b>Invoke</b> to implement <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-invoke">IDispatch::Invoke</a>.</para>
/// <para><b>ITypeInfo::Invoke</b> takes a pointer to an instance of the class. Otherwise, its parameters are the same as <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-invoke">IDispatch::Invoke</a>, except that <b>ITypeInfo::Invoke</b> omits the <i>refiid</i> and <i>lcid</i> parameters. When called, <b>ITypeInfo::Invoke</b> performs the actions described by the <b>IDispatch::Invoke</b> parameters on the specified instance.</para>
/// <para>For VTBL interface members, <b>ITypeInfo::Invoke</b> passes the LCID of the type information into parameters tagged with the lcid attribute, and the returned value into the retval attribute.</para>
/// <para>If the type description inherits from another type description, this function recurses on the base type description to find the item with the requested member ID.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-invoke#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT Invoke(void* pvInstance, int memid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, winmdroot.System.Com.DISPPARAMS* pDispParams, winmdroot.System.Variant.VARIANT* pVarResult, winmdroot.System.Com.EXCEPINFO* pExcepInfo, uint* puArgErr)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,void* ,int ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((ITypeInfo*)Unsafe.AsPointer(ref this), pvInstance, memid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
/// <inheritdoc cref="GetDocumentation(int, winmdroot.Foundation.BSTR*, winmdroot.Foundation.BSTR*, uint*, winmdroot.Foundation.BSTR*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetDocumentation(int memid, winmdroot.Foundation.BSTR* pBstrName, winmdroot.Foundation.BSTR* pBstrDocString, out uint pdwHelpContext, winmdroot.Foundation.BSTR* pBstrHelpFile)
{
fixed (uint* pdwHelpContextLocal = &pdwHelpContext)
{
winmdroot.Foundation.HRESULT __result = this.GetDocumentation(memid, pBstrName, pBstrDocString, pdwHelpContextLocal, pBstrHelpFile);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetDocumentation(ITypeInfo* pThis, int memid, [Optional] winmdroot.Foundation.BSTR* pBstrName, [Optional] winmdroot.Foundation.BSTR* pBstrDocString, uint* pdwHelpContext, [Optional] winmdroot.Foundation.BSTR* pBstrHelpFile)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetDocumentation(memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description.</summary>
/// <param name="memid">The ID of the member whose documentation is to be returned.</param>
/// <param name="pBstrName">The name of the specified item. If the caller does not need the item name, <i>pBstrName</i> can be null.</param>
/// <param name="pBstrDocString">The documentation string for the specified item. If the caller does not need the documentation string, <i>pBstrDocString</i> can be null.</param>
/// <param name="pdwHelpContext">The Help localization context. If the caller does not need the Help context, it can be null.</param>
/// <param name="pBstrHelpFile">The fully qualified name of the file containing the DLL used for Help file. If the caller does not need the file name, it can be null.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The function <b>GetDocumentation</b> provides access to the documentation for the member specified by the <i>memid</i> parameter. If the passed-in <i>memid</i> is MEMBERID_NIL, then the documentation for the type description is returned.</para>
/// <para>If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para>The caller should use <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysfreestring">SysFreeString</a> to free the BSTRs referenced by <i>pBstrName</i>, <i>pBstrDocString</i>, and <i>pBstrHelpFile</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getdocumentation#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetDocumentation(int memid, [Optional] winmdroot.Foundation.BSTR* pBstrName, [Optional] winmdroot.Foundation.BSTR* pBstrDocString, uint* pdwHelpContext, [Optional] winmdroot.Foundation.BSTR* pBstrHelpFile)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.BSTR* ,uint* ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((ITypeInfo*)Unsafe.AsPointer(ref this), memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
}
/// <inheritdoc cref="GetDllEntry(int, winmdroot.System.Com.INVOKEKIND, winmdroot.Foundation.BSTR*, winmdroot.Foundation.BSTR*, ushort*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetDllEntry(int memid, winmdroot.System.Com.INVOKEKIND invKind, winmdroot.Foundation.BSTR* pBstrDllName, winmdroot.Foundation.BSTR* pBstrName, out ushort pwOrdinal)
{
fixed (ushort* pwOrdinalLocal = &pwOrdinal)
{
winmdroot.Foundation.HRESULT __result = this.GetDllEntry(memid, invKind, pBstrDllName, pBstrName, pwOrdinalLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetDllEntry(ITypeInfo* pThis, int memid, winmdroot.System.Com.INVOKEKIND invKind, [Optional] winmdroot.Foundation.BSTR* pBstrDllName, [Optional] winmdroot.Foundation.BSTR* pBstrName, ushort* pwOrdinal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetDllEntry(memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a description or specification of an entry point for a function in a DLL.</summary>
/// <param name="memid">The ID of the member function whose DLL entry description is to be returned.</param>
/// <param name="invKind">The kind of member identified by <i>memid</i>. This is important for properties, because one <i>memid</i> can identify up to three separate functions.</param>
/// <param name="pBstrDllName">If not null, the function sets <i>pBstrDllName</i> to the name of the DLL.</param>
/// <param name="pBstrName">If not null, the function sets <i>pBstrName</i> to the name of the entry point. If the entry point is specified by an ordinal, this argument is null.</param>
/// <param name="pwOrdinal">If not null, and if the function is defined by an ordinal, the function sets <i>pwOrdinal</i> to the ordinal.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The caller passes in a member ID, which represents the member function whose entry description is desired. If the function has a DLL entry point, the name of the DLL that contains the function, as well as its name or ordinal identifier, are placed in the passed-in pointers allocated by the caller. If there is no DLL entry point for the function, an error is returned.</para>
/// <para>If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para>The caller should use <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysfreestring">SysFreeString</a> to free the BSTRs referenced by <i>pBstrName</i> and <i>pBstrDllName</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getdllentry#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetDllEntry(int memid, winmdroot.System.Com.INVOKEKIND invKind, [Optional] winmdroot.Foundation.BSTR* pBstrDllName, [Optional] winmdroot.Foundation.BSTR* pBstrName, ushort* pwOrdinal)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.System.Com.INVOKEKIND ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.BSTR* ,ushort* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((ITypeInfo*)Unsafe.AsPointer(ref this), memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetRefTypeInfo(ITypeInfo* pThis, uint hRefType, winmdroot.System.Com.ITypeInfo** ppTInfo)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetRefTypeInfo(hRefType, ppTInfo);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>If a type description references other type descriptions, it retrieves the referenced type descriptions.</summary>
/// <param name="hRefType">A handle to the referenced type description to return.</param>
/// <param name="ppTInfo">The referenced type description.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>On return, the second parameter contains a pointer to a pointer to a type description that is referenced by this type description. A type description must have a reference to each type description that occurs as the type of any of its variables, function parameters, or function return types. For example, if the type of a data member is a record type, the type description for that data member contains the <i>hRefType</i> of a referenced type description. To get a pointer to the type description, the reference is passed to <b>GetRefTypeInfo</b>.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetRefTypeInfo(uint hRefType, winmdroot.System.Com.ITypeInfo** ppTInfo)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((ITypeInfo*)Unsafe.AsPointer(ref this), hRefType, ppTInfo);
}
/// <inheritdoc cref="AddressOfMember(int, winmdroot.System.Com.INVOKEKIND, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT AddressOfMember(int memid, winmdroot.System.Com.INVOKEKIND invKind, out void* ppv)
{
fixed (void** ppvLocal = &ppv)
{
winmdroot.Foundation.HRESULT __result = this.AddressOfMember(memid, invKind, ppvLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT AddressOfMember(ITypeInfo* pThis, int memid, winmdroot.System.Com.INVOKEKIND invKind, void** ppv)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.AddressOfMember(memid, invKind, ppv);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the addresses of static functions or variables, such as those defined in a DLL.</summary>
/// <param name="memid">The member ID of the static member whose address is to be retrieved. The member ID is defined by the DISPID.</param>
/// <param name="invKind">Indicates whether the member is a property, and if so, what kind.</param>
/// <param name="ppv">The static member.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The addresses are valid until the caller releases its reference to the type description. The <i>invKind</i> parameter can be ignored unless the address of a property function is being requested. If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-addressofmember#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT AddressOfMember(int memid, winmdroot.System.Com.INVOKEKIND invKind, void** ppv)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.System.Com.INVOKEKIND ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((ITypeInfo*)Unsafe.AsPointer(ref this), memid, invKind, ppv);
}
/// <inheritdoc cref="CreateInstance(winmdroot.System.Com.IUnknown*, global::System.Guid*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT CreateInstance(winmdroot.System.Com.IUnknown* pUnkOuter, in global::System.Guid riid, out void* ppvObj)
{
fixed (void** ppvObjLocal = &ppvObj)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.CreateInstance(pUnkOuter, riidLocal, ppvObjLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT CreateInstance(ITypeInfo* pThis, winmdroot.System.Com.IUnknown* pUnkOuter, global::System.Guid* riid, void** ppvObj)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.CreateInstance(pUnkOuter, riid, ppvObj);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Creates a new instance of a type that describes a component object class (coclass).</summary>
/// <param name="pUnkOuter">The controlling <b>IUnknown</b>. If Null, then a stand-alone instance is created. If valid, then an aggregate object is created.</param>
/// <param name="riid">An ID for the interface that the caller will use to communicate with the resulting object.</param>
/// <param name="ppvObj">An instance of the created object.</param>
/// <returns>
/// <para></para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>For types that describe a component object class (coclass), <b>CreateInstance</b> creates a new instance of the class. Normally, <b>CreateInstance</b> calls <b>CoCreateInstance</b> with the type description's GUID. For an Application object, it first calls <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-getactiveobject">GetActiveObject</a>. If the application is active, <b>GetActiveObject</b> returns the active object; otherwise, if <b>GetActiveObject</b> fails, <b>CreateInstance</b> calls <b>CoCreateInstance</b>.</remarks>
public unsafe winmdroot.Foundation.HRESULT CreateInstance(winmdroot.System.Com.IUnknown* pUnkOuter, global::System.Guid* riid, void** ppvObj)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.IUnknown* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[16])((ITypeInfo*)Unsafe.AsPointer(ref this), pUnkOuter, riid, ppvObj);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetMops(ITypeInfo* pThis, int memid, winmdroot.Foundation.BSTR* pBstrMops)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetMops(memid, pBstrMops);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves marshaling information.</summary>
/// <param name="memid">The member ID that indicates which marshaling information is needed.</param>
/// <param name="pBstrMops">The opcode string used in marshaling the fields of the structure described by the referenced type description, or null if there is no information to return.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the passed-in member ID is MEMBERID_NIL, the function returns the opcode string for marshaling the fields of the structure described by the type description. Otherwise, it returns the opcode string for marshaling the function specified by the index.</para>
/// <para>If the type description inherits from another type description, this function recurses on the base type description, if necessary, to find the item with the requested member ID.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getmops#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetMops(int memid, winmdroot.Foundation.BSTR* pBstrMops)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[17])((ITypeInfo*)Unsafe.AsPointer(ref this), memid, pBstrMops);
}
/// <inheritdoc cref="GetContainingTypeLib(winmdroot.System.Com.ITypeLib**, uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetContainingTypeLib(winmdroot.System.Com.ITypeLib** ppTLib, out uint pIndex)
{
fixed (uint* pIndexLocal = &pIndex)
{
winmdroot.Foundation.HRESULT __result = this.GetContainingTypeLib(ppTLib, pIndexLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetContainingTypeLib(ITypeInfo* pThis, winmdroot.System.Com.ITypeLib** ppTLib, uint* pIndex)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetContainingTypeLib(ppTLib, pIndex);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the containing type library and the index of the type description within that type library.</summary>
/// <param name="ppTLib">The containing type library.</param>
/// <param name="pIndex">The index of the type description within the containing type library.</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-itypeinfo-getcontainingtypelib">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetContainingTypeLib(winmdroot.System.Com.ITypeLib** ppTLib, uint* pIndex)
{
return ((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.ITypeLib** ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[18])((ITypeInfo*)Unsafe.AsPointer(ref this), ppTLib, pIndex);
}
/// <inheritdoc cref="ReleaseTypeAttr(winmdroot.System.Com.TYPEATTR*)"/>
internal unsafe void ReleaseTypeAttr(in winmdroot.System.Com.TYPEATTR pTypeAttr)
{
fixed (winmdroot.System.Com.TYPEATTR* pTypeAttrLocal = &pTypeAttr)
{
this.ReleaseTypeAttr(pTypeAttrLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void ReleaseTypeAttr(ITypeInfo* pThis, winmdroot.System.Com.TYPEATTR* pTypeAttr)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.ReleaseTypeAttr(pTypeAttr);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Releases a TYPEATTR previously returned by ITypeInfo::GetTypeAttr.</summary>
/// <param name="pTypeAttr">The TYPEATTR to be freed.</param>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-releasetypeattr">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void ReleaseTypeAttr(winmdroot.System.Com.TYPEATTR* pTypeAttr)
{
((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.TYPEATTR* ,void>)lpVtbl[19])((ITypeInfo*)Unsafe.AsPointer(ref this), pTypeAttr);
}
/// <inheritdoc cref="ReleaseFuncDesc(winmdroot.System.Com.FUNCDESC*)"/>
internal unsafe void ReleaseFuncDesc(in winmdroot.System.Com.FUNCDESC pFuncDesc)
{
fixed (winmdroot.System.Com.FUNCDESC* pFuncDescLocal = &pFuncDesc)
{
this.ReleaseFuncDesc(pFuncDescLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void ReleaseFuncDesc(ITypeInfo* pThis, winmdroot.System.Com.FUNCDESC* pFuncDesc)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.ReleaseFuncDesc(pFuncDesc);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Releases a FUNCDESC previously returned by ITypeInfo::GetFuncDesc.</summary>
/// <param name="pFuncDesc">The FUNCDESC to be freed.</param>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-releasefuncdesc">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void ReleaseFuncDesc(winmdroot.System.Com.FUNCDESC* pFuncDesc)
{
((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.FUNCDESC* ,void>)lpVtbl[20])((ITypeInfo*)Unsafe.AsPointer(ref this), pFuncDesc);
}
/// <inheritdoc cref="ReleaseVarDesc(winmdroot.System.Com.VARDESC*)"/>
internal unsafe void ReleaseVarDesc(in winmdroot.System.Com.VARDESC pVarDesc)
{
fixed (winmdroot.System.Com.VARDESC* pVarDescLocal = &pVarDesc)
{
this.ReleaseVarDesc(pVarDescLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void ReleaseVarDesc(ITypeInfo* pThis, winmdroot.System.Com.VARDESC* pVarDesc)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.ReleaseVarDesc(pVarDesc);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Releases a VARDESC previously returned by ITypeInfo::GetVarDesc.</summary>
/// <param name="pVarDesc">The VARDESC to be freed.</param>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-releasevardesc">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void ReleaseVarDesc(winmdroot.System.Com.VARDESC* pVarDesc)
{
((delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.VARDESC* ,void>)lpVtbl[21])((ITypeInfo*)Unsafe.AsPointer(ref this), pVarDesc);
}
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]<ITypeInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.TYPEATTR** ,winmdroot.Foundation.HRESULT> GetTypeAttr_4;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.ITypeComp** ,winmdroot.Foundation.HRESULT> GetTypeComp_5;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.FUNCDESC** ,winmdroot.Foundation.HRESULT> GetFuncDesc_6;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.VARDESC** ,winmdroot.Foundation.HRESULT> GetVarDesc_7;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,uint ,uint* ,winmdroot.Foundation.HRESULT> GetNames_8;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,uint* ,winmdroot.Foundation.HRESULT> GetRefTypeOfImplType_9;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.IMPLTYPEFLAGS* ,winmdroot.Foundation.HRESULT> GetImplTypeFlags_10;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.Foundation.PWSTR* ,uint ,int* ,winmdroot.Foundation.HRESULT> GetIDsOfNames_11;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,void* ,int ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT> Invoke_12;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.BSTR* ,uint* ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetDocumentation_13;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.System.Com.INVOKEKIND ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.BSTR* ,ushort* ,winmdroot.Foundation.HRESULT> GetDllEntry_14;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetRefTypeInfo_15;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.System.Com.INVOKEKIND ,void** ,winmdroot.Foundation.HRESULT> AddressOfMember_16;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.IUnknown* ,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> CreateInstance_17;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,int ,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetMops_18;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.ITypeLib** ,uint* ,winmdroot.Foundation.HRESULT> GetContainingTypeLib_19;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.TYPEATTR* ,void> ReleaseTypeAttr_20;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.FUNCDESC* ,void> ReleaseFuncDesc_21;
internal delegate *unmanaged [Stdcall]<ITypeInfo*,winmdroot.System.Com.VARDESC* ,void> ReleaseVarDesc_22;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->GetTypeAttr_4 = &GetTypeAttr;
vtable->GetTypeComp_5 = &GetTypeComp;
vtable->GetFuncDesc_6 = &GetFuncDesc;
vtable->GetVarDesc_7 = &GetVarDesc;
vtable->GetNames_8 = &GetNames;
vtable->GetRefTypeOfImplType_9 = &GetRefTypeOfImplType;
vtable->GetImplTypeFlags_10 = &GetImplTypeFlags;
vtable->GetIDsOfNames_11 = &GetIDsOfNames;
vtable->Invoke_12 = &Invoke;
vtable->GetDocumentation_13 = &GetDocumentation;
vtable->GetDllEntry_14 = &GetDllEntry;
vtable->GetRefTypeInfo_15 = &GetRefTypeInfo;
vtable->AddressOfMember_16 = &AddressOfMember;
vtable->CreateInstance_17 = &CreateInstance;
vtable->GetMops_18 = &GetMops;
vtable->GetContainingTypeLib_19 = &GetContainingTypeLib;
vtable->ReleaseTypeAttr_20 = &ReleaseTypeAttr;
vtable->ReleaseFuncDesc_21 = &ReleaseFuncDesc;
vtable->ReleaseVarDesc_22 = &ReleaseVarDesc;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{00020401-0000-0000-c000-000000000046}</value>
internal static readonly Guid IID_Guid = new Guid(0x00020401, 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[] {
0x01,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("00020401-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetTypeAttr(winmdroot.System.Com.TYPEATTR** ppTypeAttr);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetTypeComp(winmdroot.System.Com.ITypeComp** ppTComp);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetFuncDesc(uint index, winmdroot.System.Com.FUNCDESC** ppFuncDesc);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetVarDesc(uint index, winmdroot.System.Com.VARDESC** ppVarDesc);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetNames(int memid, winmdroot.Foundation.BSTR* rgBstrNames, uint cMaxNames, uint* pcNames);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetRefTypeOfImplType(uint index, uint* pRefType);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetImplTypeFlags(uint index, winmdroot.System.Com.IMPLTYPEFLAGS* pImplTypeFlags);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetIDsOfNames(winmdroot.Foundation.PWSTR* rgszNames, uint cNames, int* pMemId);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Invoke(void* pvInstance, int memid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, winmdroot.System.Com.DISPPARAMS* pDispParams, winmdroot.System.Variant.VARIANT* pVarResult, winmdroot.System.Com.EXCEPINFO* pExcepInfo, uint* puArgErr);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetDocumentation(int memid, [Optional] winmdroot.Foundation.BSTR* pBstrName, [Optional] winmdroot.Foundation.BSTR* pBstrDocString, uint* pdwHelpContext, [Optional] winmdroot.Foundation.BSTR* pBstrHelpFile);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetDllEntry(int memid, winmdroot.System.Com.INVOKEKIND invKind, [Optional] winmdroot.Foundation.BSTR* pBstrDllName, [Optional] winmdroot.Foundation.BSTR* pBstrName, ushort* pwOrdinal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetRefTypeInfo(uint hRefType, winmdroot.System.Com.ITypeInfo** ppTInfo);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT AddressOfMember(int memid, winmdroot.System.Com.INVOKEKIND invKind, void** ppv);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT CreateInstance(winmdroot.System.Com.IUnknown* pUnkOuter, global::System.Guid* riid, void** ppvObj);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetMops(int memid, winmdroot.Foundation.BSTR* pBstrMops);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetContainingTypeLib(winmdroot.System.Com.ITypeLib** ppTLib, uint* pIndex);
[PreserveSig()]
unsafe void ReleaseTypeAttr(winmdroot.System.Com.TYPEATTR* pTypeAttr);
[PreserveSig()]
unsafe void ReleaseFuncDesc(winmdroot.System.Com.FUNCDESC* pFuncDesc);
[PreserveSig()]
unsafe void ReleaseVarDesc(winmdroot.System.Com.VARDESC* pVarDesc);
}
}
}
}
|