|
// ------------------------------------------------------------------------------
// <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("A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851")]
[SupportedOSPlatform("windows5.0")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IProvideClassInfo2
:IVTable<IProvideClassInfo2,IProvideClassInfo2.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]<IProvideClassInfo2*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IProvideClassInfo2*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint>)lpVtbl[1])((IProvideClassInfo2*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint>)lpVtbl[2])((IProvideClassInfo2*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetClassInfo(IProvideClassInfo2* pThis, winmdroot.System.Com.ITypeInfo** ppTI)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetClassInfo(ppTI);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void GetClassInfo(winmdroot.System.Com.ITypeInfo** ppTI)
{
((delegate *unmanaged [Stdcall]<IProvideClassInfo2*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IProvideClassInfo2*)Unsafe.AsPointer(ref this), ppTI).ThrowOnFailure();
}
/// <inheritdoc cref="GetGUID(uint, global::System.Guid*)"/>
internal unsafe void GetGUID(uint dwGuidKind, out global::System.Guid pGUID)
{
fixed (global::System.Guid* pGUIDLocal = &pGUID)
{
this.GetGUID(dwGuidKind, pGUIDLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetGUID(IProvideClassInfo2* pThis, uint dwGuidKind, global::System.Guid* pGUID)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetGUID(dwGuidKind, pGUID);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the specified GUID for the object.</summary>
/// <param name="dwGuidKind">The GUID type. Possible values are from the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ne-ocidl-guidkind">GUIDKIND</a> enumeration.</param>
/// <param name="pGUID">A pointer to a variable that receives the GUID.</param>
/// <returns>This method can return the standard return values E_INVALIDARG, E_UNEXPECTED, E_POINTER, and S_OK.</returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-iprovideclassinfo2-getguid">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetGUID(uint dwGuidKind, global::System.Guid* pGUID)
{
((delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint ,global::System.Guid* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IProvideClassInfo2*)Unsafe.AsPointer(ref this), dwGuidKind, pGUID).ThrowOnFailure();
}
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]<IProvideClassInfo2*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IProvideClassInfo2*,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetClassInfo_4;
internal delegate *unmanaged [Stdcall]<IProvideClassInfo2*,uint ,global::System.Guid* ,winmdroot.Foundation.HRESULT> GetGUID_5;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->GetClassInfo_4 = &GetClassInfo;
vtable->GetGUID_5 = &GetGUID;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{a6bc3ac0-dbaa-11ce-9de3-00aa004bb851}</value>
internal static readonly Guid IID_Guid = new Guid(0xA6BC3AC0, 0xDBAA, 0x11CE, 0x9D, 0xE3, 0x00, 0xAA, 0x00, 0x4B, 0xB8, 0x51);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xC0,0x3A,0xBC,0xA6,0xAA,0xDB,0xCE,0x11,0x9D,0xE3,0x00,0xAA,0x00,0x4B,0xB8,0x51 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.0")]
internal interface Interface
:winmdroot.System.Ole.IProvideClassInfo.Interface {
[PreserveSig()]
unsafe new winmdroot.Foundation.HRESULT GetClassInfo(winmdroot.System.Com.ITypeInfo** ppTI);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetGUID(uint dwGuidKind, global::System.Guid* pGUID);
}
}
}
}
|