|
// ------------------------------------------------------------------------------
// <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("3AF24290-0C96-11CE-A0CF-00AA00600AB8")]
[SupportedOSPlatform("windows5.0")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IAdviseSinkEx
:IVTable<IAdviseSinkEx,IAdviseSinkEx.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]<IAdviseSinkEx*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IAdviseSinkEx*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint>)lpVtbl[1])((IAdviseSinkEx*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint>)lpVtbl[2])((IAdviseSinkEx*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="OnDataChange(winmdroot.System.Com.FORMATETC*, winmdroot.System.Com.STGMEDIUM*)"/>
internal unsafe void OnDataChange(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.OnDataChange(pFormatetcLocal, pStgmedLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnDataChange(IAdviseSinkEx* pThis, winmdroot.System.Com.FORMATETC* pFormatetc, winmdroot.System.Com.STGMEDIUM* pStgmed)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnDataChange(pFormatetc, pStgmed);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
public unsafe void OnDataChange(winmdroot.System.Com.FORMATETC* pFormatetc, winmdroot.System.Com.STGMEDIUM* pStgmed)
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,void>)lpVtbl[3])((IAdviseSinkEx*)Unsafe.AsPointer(ref this), pFormatetc, pStgmed);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnViewChange(IAdviseSinkEx* pThis, uint dwAspect, int lindex)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnViewChange(dwAspect, lindex);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
public void OnViewChange(uint dwAspect, int lindex)
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint ,int ,void>)lpVtbl[4])((IAdviseSinkEx*)Unsafe.AsPointer(ref this), dwAspect, lindex);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnRename(IAdviseSinkEx* pThis, winmdroot.System.Com.IMoniker* pmk)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnRename(pmk);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
public unsafe void OnRename(winmdroot.System.Com.IMoniker* pmk)
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,winmdroot.System.Com.IMoniker* ,void>)lpVtbl[5])((IAdviseSinkEx*)Unsafe.AsPointer(ref this), pmk);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnSave(IAdviseSinkEx* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnSave();
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
public void OnSave()
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,void>)lpVtbl[6])((IAdviseSinkEx*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnClose(IAdviseSinkEx* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnClose();
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
public void OnClose()
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,void>)lpVtbl[7])((IAdviseSinkEx*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static void OnViewStatusChange(IAdviseSinkEx* pThis, uint dwViewStatus)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
__hr.ThrowOnFailure();
__object.OnViewStatusChange(dwViewStatus);
}
catch (Exception ex)
{
global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
throw;
}
}
/// <summary>Notifies the sink that a view status of an object has changed.</summary>
/// <param name="dwViewStatus">The new view status. Possible values are from the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ne-ocidl-viewstatus">VIEWSTATUS</a> enumeration.</param>
/// <returns>This method returns S_OK on success.</returns>
/// <remarks>It is important that objects call the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-iadvisesink-onviewchange">IAdviseSink:OnViewChange</a> method whenever the object's view changes even when the object is in place active. Containers rely on this notification to keep an object's view up-to-date.</remarks>
public void OnViewStatusChange(uint dwViewStatus)
{
((delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint ,void>)lpVtbl[8])((IAdviseSinkEx*)Unsafe.AsPointer(ref this), dwViewStatus);
}
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]<IAdviseSinkEx*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,winmdroot.System.Com.FORMATETC* ,winmdroot.System.Com.STGMEDIUM* ,void> OnDataChange_4;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint ,int ,void> OnViewChange_5;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,winmdroot.System.Com.IMoniker* ,void> OnRename_6;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,void> OnSave_7;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,void> OnClose_8;
internal delegate *unmanaged [Stdcall]<IAdviseSinkEx*,uint ,void> OnViewStatusChange_9;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->OnDataChange_4 = &OnDataChange;
vtable->OnViewChange_5 = &OnViewChange;
vtable->OnRename_6 = &OnRename;
vtable->OnSave_7 = &OnSave;
vtable->OnClose_8 = &OnClose;
vtable->OnViewStatusChange_9 = &OnViewStatusChange;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{3af24290-0c96-11ce-a0cf-00aa00600ab8}</value>
internal static readonly Guid IID_Guid = new Guid(0x3AF24290, 0x0C96, 0x11CE, 0xA0, 0xCF, 0x00, 0xAA, 0x00, 0x60, 0x0A, 0xB8);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x90,0x42,0xF2,0x3A,0x96,0x0C,0xCE,0x11,0xA0,0xCF,0x00,0xAA,0x00,0x60,0x0A,0xB8 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("3AF24290-0C96-11CE-A0CF-00AA00600AB8"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.0")]
internal interface Interface
:winmdroot.System.Com.IAdviseSink.Interface {
[PreserveSig()]
unsafe new void OnDataChange(winmdroot.System.Com.FORMATETC* pFormatetc, winmdroot.System.Com.STGMEDIUM* pStgmed);
[PreserveSig()]
new void OnViewChange(uint dwAspect, int lindex);
[PreserveSig()]
unsafe new void OnRename(winmdroot.System.Com.IMoniker* pmk);
[PreserveSig()]
new void OnSave();
[PreserveSig()]
new void OnClose();
[PreserveSig()]
void OnViewStatusChange(uint dwViewStatus);
}
}
}
}
|