|
// ------------------------------------------------------------------------------
// <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("DF0B3D60-548F-101B-8E65-08002B2BD119")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct ISupportErrorInfo
:IVTable<ISupportErrorInfo,ISupportErrorInfo.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]<ISupportErrorInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ISupportErrorInfo*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<ISupportErrorInfo*,uint>)lpVtbl[1])((ISupportErrorInfo*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<ISupportErrorInfo*,uint>)lpVtbl[2])((ISupportErrorInfo*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="InterfaceSupportsErrorInfo(global::System.Guid*)"/>
internal unsafe winmdroot.Foundation.HRESULT InterfaceSupportsErrorInfo(in global::System.Guid riid)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.InterfaceSupportsErrorInfo(riidLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT InterfaceSupportsErrorInfo(ISupportErrorInfo* pThis, global::System.Guid* riid)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.InterfaceSupportsErrorInfo(riid);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Indicates whether an interface supports the IErrorInfo interface.</summary>
/// <param name="riid">An interface identifier (IID).</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Objects that support the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-ierrorinfo">IErrorInfo</a> interface must also implement this interface.</para>
/// <para>Programs that receive an error return value should call <b>QueryInterface</b> to get a pointer to the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-isupporterrorinfo">ISupportErrorInfo</a> interface, and then call <b>InterfaceSupportsErrorInfo</b> with the <i>riid</i> of the interface that returned the return value. If <b>InterfaceSupportsErrorInfo</b> returns S_FALSE, then the error object does not represent an error returned from the caller, but from somewhere else. In this case, the error object can be considered incorrect and should be discarded.</para>
/// <para>If <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-isupporterrorinfo">ISupportErrorInfo</a> returns S_OK, use the <a href="https://docs.microsoft.com/windows/desktop/api/oleauto/nf-oleauto-geterrorinfo">GetErrorInfo</a> function to get a pointer to the error object.</para>
/// <para>For an example that demonstrates implementing <b>InterfaceSupportsErrorInfo</b>, see the ErrorInfo.cpp file in the COM Fundamentals Lines sample.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-isupporterrorinfo-interfacesupportserrorinfo#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT InterfaceSupportsErrorInfo(global::System.Guid* riid)
{
return ((delegate *unmanaged [Stdcall]<ISupportErrorInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ISupportErrorInfo*)Unsafe.AsPointer(ref this), riid);
}
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]<ISupportErrorInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<ISupportErrorInfo*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<ISupportErrorInfo*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<ISupportErrorInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT> InterfaceSupportsErrorInfo_4;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->InterfaceSupportsErrorInfo_4 = &InterfaceSupportsErrorInfo;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{df0b3d60-548f-101b-8e65-08002b2bd119}</value>
internal static readonly Guid IID_Guid = new Guid(0xDF0B3D60, 0x548F, 0x101B, 0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x60,0x3D,0x0B,0xDF,0x8F,0x54,0x1B,0x10,0x8E,0x65,0x08,0x00,0x2B,0x2B,0xD1,0x19 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("DF0B3D60-548F-101B-8E65-08002B2BD119"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT InterfaceSupportsErrorInfo(global::System.Guid* riid);
}
}
}
}
|