|
// ------------------------------------------------------------------------------
// <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("79EAC9C1-BAF9-11CE-8C82-00AA004BA90B")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IBindStatusCallback
:IVTable<IBindStatusCallback,IBindStatusCallback.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]<IBindStatusCallback*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IBindStatusCallback*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint>)lpVtbl[1])((IBindStatusCallback*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint>)lpVtbl[2])((IBindStatusCallback*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnStartBinding(IBindStatusCallback* pThis, uint dwReserved, winmdroot.System.Com.IBinding* pib)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnStartBinding(dwReserved, pib);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void OnStartBinding(uint dwReserved, winmdroot.System.Com.IBinding* pib)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,winmdroot.System.Com.IBinding* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IBindStatusCallback*)Unsafe.AsPointer(ref this), dwReserved, pib).ThrowOnFailure();
}
/// <inheritdoc cref="GetPriority(int*)"/>
internal unsafe void GetPriority(out int pnPriority)
{
fixed (int* pnPriorityLocal = &pnPriority)
{
this.GetPriority(pnPriorityLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPriority(IBindStatusCallback* pThis, int* pnPriority)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPriority(pnPriority);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void GetPriority(int* pnPriority)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IBindStatusCallback*)Unsafe.AsPointer(ref this), pnPriority).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnLowResource(IBindStatusCallback* pThis, uint reserved)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnLowResource(reserved);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public void OnLowResource(uint reserved)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IBindStatusCallback*)Unsafe.AsPointer(ref this), reserved).ThrowOnFailure();
}
/// <inheritdoc cref="OnProgress(uint, uint, uint, winmdroot.Foundation.PCWSTR)"/>
internal unsafe void OnProgress(uint ulProgress, uint ulProgressMax, uint ulStatusCode, string szStatusText)
{
fixed (char* szStatusTextLocal = szStatusText)
{
this.OnProgress(ulProgress, ulProgressMax, ulStatusCode, szStatusTextLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnProgress(IBindStatusCallback* pThis, uint ulProgress, uint ulProgressMax, uint ulStatusCode, winmdroot.Foundation.PCWSTR szStatusText)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnProgress(ulProgress, ulProgressMax, ulStatusCode, szStatusText);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public void OnProgress(uint ulProgress, uint ulProgressMax, uint ulStatusCode, winmdroot.Foundation.PCWSTR szStatusText)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,uint ,uint ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IBindStatusCallback*)Unsafe.AsPointer(ref this), ulProgress, ulProgressMax, ulStatusCode, szStatusText).ThrowOnFailure();
}
/// <inheritdoc cref="OnStopBinding(winmdroot.Foundation.HRESULT, winmdroot.Foundation.PCWSTR)"/>
internal unsafe void OnStopBinding(winmdroot.Foundation.HRESULT hresult, string szError)
{
fixed (char* szErrorLocal = szError)
{
this.OnStopBinding(hresult, szErrorLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnStopBinding(IBindStatusCallback* pThis, winmdroot.Foundation.HRESULT hresult, winmdroot.Foundation.PCWSTR szError)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnStopBinding(hresult, szError);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public void OnStopBinding(winmdroot.Foundation.HRESULT hresult, winmdroot.Foundation.PCWSTR szError)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,winmdroot.Foundation.HRESULT ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IBindStatusCallback*)Unsafe.AsPointer(ref this), hresult, szError).ThrowOnFailure();
}
/// <inheritdoc cref="GetBindInfo(uint*, winmdroot.System.Com.BINDINFO*)"/>
internal unsafe void GetBindInfo(out uint grfBINDF, ref winmdroot.System.Com.BINDINFO pbindinfo)
{
fixed (winmdroot.System.Com.BINDINFO* pbindinfoLocal = &pbindinfo)
{
fixed (uint* grfBINDFLocal = &grfBINDF)
{
this.GetBindInfo(grfBINDFLocal, pbindinfoLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetBindInfo(IBindStatusCallback* pThis, uint* grfBINDF, winmdroot.System.Com.BINDINFO* pbindinfo)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetBindInfo(grfBINDF, pbindinfo);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void GetBindInfo(uint* grfBINDF, winmdroot.System.Com.BINDINFO* pbindinfo)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint* ,winmdroot.System.Com.BINDINFO* ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((IBindStatusCallback*)Unsafe.AsPointer(ref this), grfBINDF, pbindinfo).ThrowOnFailure();
}
/// <inheritdoc cref="OnDataAvailable(uint, uint, winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.STGMEDIUM*)"/>
internal unsafe void OnDataAvailable(uint grfBSCF, uint dwSize, in winmdroot.System.Com.FORMATETC pformatetc, in winmdroot.System.Com.STGMEDIUM pstgmed)
{
fixed (winmdroot.System.Com.STGMEDIUM* pstgmedLocal = &pstgmed)
{
fixed (winmdroot.System.Com.FORMATETC* pformatetcLocal = &pformatetc)
{
this.OnDataAvailable(grfBSCF, dwSize, pformatetcLocal, pstgmedLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnDataAvailable(IBindStatusCallback* pThis, uint grfBSCF, uint dwSize, winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pstgmed)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnDataAvailable(grfBSCF, dwSize, pformatetc, pstgmed);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void OnDataAvailable(uint grfBSCF, uint dwSize, winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pstgmed)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,uint ,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IBindStatusCallback*)Unsafe.AsPointer(ref this), grfBSCF, dwSize, pformatetc, pstgmed).ThrowOnFailure();
}
/// <inheritdoc cref="OnObjectAvailable(global::System.Guid*, winmdroot.System.Com.IUnknown*)"/>
internal unsafe void OnObjectAvailable(in global::System.Guid riid, winmdroot.System.Com.IUnknown* punk)
{
fixed (global::System.Guid* riidLocal = &riid)
{
this.OnObjectAvailable(riidLocal, punk);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT OnObjectAvailable(IBindStatusCallback* pThis, global::System.Guid* riid, winmdroot.System.Com.IUnknown* punk)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.OnObjectAvailable(riid, punk);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void OnObjectAvailable(global::System.Guid* riid, winmdroot.System.Com.IUnknown* punk)
{
((delegate *unmanaged [Stdcall]<IBindStatusCallback*,global::System.Guid* ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IBindStatusCallback*)Unsafe.AsPointer(ref this), riid, punk).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]<IBindStatusCallback*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,winmdroot.System.Com.IBinding* ,winmdroot.Foundation.HRESULT> OnStartBinding_4;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,int* ,winmdroot.Foundation.HRESULT> GetPriority_5;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,winmdroot.Foundation.HRESULT> OnLowResource_6;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,uint ,uint ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT> OnProgress_7;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,winmdroot.Foundation.HRESULT ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT> OnStopBinding_8;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint* ,winmdroot.System.Com.BINDINFO* ,winmdroot.Foundation.HRESULT> GetBindInfo_9;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,uint ,uint ,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,winmdroot.Foundation.HRESULT> OnDataAvailable_10;
internal delegate *unmanaged [Stdcall]<IBindStatusCallback*,global::System.Guid* ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.HRESULT> OnObjectAvailable_11;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->OnStartBinding_4 = &OnStartBinding;
vtable->GetPriority_5 = &GetPriority;
vtable->OnLowResource_6 = &OnLowResource;
vtable->OnProgress_7 = &OnProgress;
vtable->OnStopBinding_8 = &OnStopBinding;
vtable->GetBindInfo_9 = &GetBindInfo;
vtable->OnDataAvailable_10 = &OnDataAvailable;
vtable->OnObjectAvailable_11 = &OnObjectAvailable;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{79eac9c1-baf9-11ce-8c82-00aa004ba90b}</value>
internal static readonly Guid IID_Guid = new Guid(0x79EAC9C1, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xC1,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("79EAC9C1-BAF9-11CE-8C82-00AA004BA90B"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT OnStartBinding(uint dwReserved, winmdroot.System.Com.IBinding* pib);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPriority(int* pnPriority);
[PreserveSig()]
winmdroot.Foundation.HRESULT OnLowResource(uint reserved);
[PreserveSig()]
winmdroot.Foundation.HRESULT OnProgress(uint ulProgress, uint ulProgressMax, uint ulStatusCode, winmdroot.Foundation.PCWSTR szStatusText);
[PreserveSig()]
winmdroot.Foundation.HRESULT OnStopBinding(winmdroot.Foundation.HRESULT hresult, winmdroot.Foundation.PCWSTR szError);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetBindInfo(uint* grfBINDF, winmdroot.System.Com.BINDINFO* pbindinfo);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT OnDataAvailable(uint grfBSCF, uint dwSize, winmdroot.System.Com.FORMATETC* pformatetc, winmdroot.System.Com.STGMEDIUM* pstgmed);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT OnObjectAvailable(global::System.Guid* riid, winmdroot.System.Com.IUnknown* punk);
}
}
}
}
|