|
// ------------------------------------------------------------------------------
// <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("1CF2B120-547D-101B-8E65-08002B2BD119")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IErrorInfo
:IVTable<IErrorInfo,IErrorInfo.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]<IErrorInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IErrorInfo*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IErrorInfo*,uint>)lpVtbl[1])((IErrorInfo*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IErrorInfo*,uint>)lpVtbl[2])((IErrorInfo*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="GetGUID(global::System.Guid*)"/>
internal unsafe void GetGUID(out global::System.Guid pGUID)
{
fixed (global::System.Guid* pGUIDLocal = &pGUID)
{
this.GetGUID(pGUIDLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetGUID(IErrorInfo* 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>Returns the globally unique identifier (GUID) of the interface that defined the error.</summary>
/// <param name="pGUID">A pointer to a GUID, or GUID_NULL, if the error was defined by the operating system.</param>
/// <returns>If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</returns>
/// <remarks>
/// <para><b>IErrorInfo::GetGUID</b> returns the GUID of the interface that defined the error. If the error was defined by the system, <b>IErrorInfo::GetGUID</b> returns GUID_NULL.</para>
/// <para>This GUID does not necessarily represent the source of the error. The source is the class or application that raised the error. Using the GUID, an application can handle errors in an interface, independent of the class that implements the interface.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-ierrorinfo-getguid#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetGUID(global::System.Guid* pGUID)
{
((delegate *unmanaged [Stdcall]<IErrorInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IErrorInfo*)Unsafe.AsPointer(ref this), pGUID).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetSource(IErrorInfo* pThis, winmdroot.Foundation.BSTR* pBstrSource)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetSource(pBstrSource);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns the language-dependent programmatic ID (ProgID) for the class or application that raised the error.</summary>
/// <param name="pBstrSource">A ProgID, in the form <i>progname</i>.<i>objectname</i>.</param>
/// <returns>If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</returns>
/// <remarks>Use <b>IErrorInfo::GetSource</b> to determine the class or application that is the source of the error. The language for the returned ProgID depends on the locale ID (LCID) that was passed into the method at the time of invocation.</remarks>
public unsafe void GetSource(winmdroot.Foundation.BSTR* pBstrSource)
{
((delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IErrorInfo*)Unsafe.AsPointer(ref this), pBstrSource).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetDescription(IErrorInfo* pThis, winmdroot.Foundation.BSTR* pBstrDescription)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetDescription(pBstrDescription);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns a textual description of the error.</summary>
/// <param name="pBstrDescription">A brief description of the error.</param>
/// <returns>If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</returns>
/// <remarks>The text is returned in the language specified by the locale identifier (LCID) that was passed to <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-invoke">IDispatch::Invoke</a> for the method that encountered the error.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetDescription(winmdroot.Foundation.BSTR* pBstrDescription)
{
return ((delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IErrorInfo*)Unsafe.AsPointer(ref this), pBstrDescription);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetHelpFile(IErrorInfo* pThis, winmdroot.Foundation.BSTR* pBstrHelpFile)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetHelpFile(pBstrHelpFile);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns the path of the Help file that describes the error.</summary>
/// <param name="pBstrHelpFile">The fully qualified path of the Help file.</param>
/// <returns>If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</returns>
/// <remarks>This method returns the fully qualified path of the Help file that describes the current error. <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-ierrorinfo-gethelpcontext">IErrorInfo::GetHelpContext</a> should be used to find the Help context ID for the error in the Help file.</remarks>
public unsafe void GetHelpFile(winmdroot.Foundation.BSTR* pBstrHelpFile)
{
((delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IErrorInfo*)Unsafe.AsPointer(ref this), pBstrHelpFile).ThrowOnFailure();
}
/// <inheritdoc cref="GetHelpContext(uint*)"/>
internal unsafe void GetHelpContext(out uint pdwHelpContext)
{
fixed (uint* pdwHelpContextLocal = &pdwHelpContext)
{
this.GetHelpContext(pdwHelpContextLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetHelpContext(IErrorInfo* pThis, uint* pdwHelpContext)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetHelpContext(pdwHelpContext);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Returns the Help context identifier (ID) for the error.</summary>
/// <param name="pdwHelpContext">The Help context ID for the error.</param>
/// <returns>If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</returns>
/// <remarks>This method returns the Help context ID for the error. To find the Help file to which it applies, use <a href="https://docs.microsoft.com/windows/desktop/api/oaidl/nf-oaidl-ierrorinfo-gethelpfile">IErrorInfo::GetHelpFile</a>.</remarks>
public unsafe void GetHelpContext(uint* pdwHelpContext)
{
((delegate *unmanaged [Stdcall]<IErrorInfo*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IErrorInfo*)Unsafe.AsPointer(ref this), pdwHelpContext).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]<IErrorInfo*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,global::System.Guid* ,winmdroot.Foundation.HRESULT> GetGUID_4;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetSource_5;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetDescription_6;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetHelpFile_7;
internal delegate *unmanaged [Stdcall]<IErrorInfo*,uint* ,winmdroot.Foundation.HRESULT> GetHelpContext_8;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->GetGUID_4 = &GetGUID;
vtable->GetSource_5 = &GetSource;
vtable->GetDescription_6 = &GetDescription;
vtable->GetHelpFile_7 = &GetHelpFile;
vtable->GetHelpContext_8 = &GetHelpContext;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{1cf2b120-547d-101b-8e65-08002b2bd119}</value>
internal static readonly Guid IID_Guid = new Guid(0x1CF2B120, 0x547D, 0x101B, 0x8E, 0x65, 0x08, 0x00, 0x2B, 0x2B, 0xD1, 0x19);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x20,0xB1,0xF2,0x1C,0x7D,0x54,0x1B,0x10,0x8E,0x65,0x08,0x00,0x2B,0x2B,0xD1,0x19 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("1CF2B120-547D-101B-8E65-08002B2BD119"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetGUID(global::System.Guid* pGUID);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetSource(winmdroot.Foundation.BSTR* pBstrSource);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetDescription(winmdroot.Foundation.BSTR* pBstrDescription);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetHelpFile(winmdroot.Foundation.BSTR* pBstrHelpFile);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetHelpContext(uint* pdwHelpContext);
}
}
}
}
|