|
// ------------------------------------------------------------------------------
// <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("742B0E01-14E6-101B-914E-00AA00300CAB")]
[SupportedOSPlatform("windows5.0")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct ISimpleFrameSite
:IVTable<ISimpleFrameSite,ISimpleFrameSite.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]<ISimpleFrameSite*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ISimpleFrameSite*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<ISimpleFrameSite*,uint>)lpVtbl[1])((ISimpleFrameSite*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<ISimpleFrameSite*,uint>)lpVtbl[2])((ISimpleFrameSite*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="PreMessageFilter(winmdroot.Foundation.HWND, uint, winmdroot.Foundation.WPARAM, winmdroot.Foundation.LPARAM, winmdroot.Foundation.LRESULT*, uint*)"/>
internal unsafe void PreMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, out winmdroot.Foundation.LRESULT plResult, out uint pdwCookie)
{
fixed (uint* pdwCookieLocal = &pdwCookie)
{
fixed (winmdroot.Foundation.LRESULT* plResultLocal = &plResult)
{
this.PreMessageFilter(hWnd, msg, wp, lp, plResultLocal, pdwCookieLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT PreMessageFilter(ISimpleFrameSite* pThis, winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint* pdwCookie)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.PreMessageFilter(hWnd, msg, wp, lp, plResult, pdwCookie);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Provides a site with the opportunity to process a message that is received by a control's own window before the control itself does any processing.</summary>
/// <param name="hWnd">A handle of the control window receiving the message.</param>
/// <param name="msg">The message received by the simple frame site.</param>
/// <param name="wp">The <b>WPARAM</b> of the message.</param>
/// <param name="lp">The <b>LPARAM</b> of the message.</param>
/// <param name="plResult">A pointer to the variable that receives the result of the message processing.</param>
/// <param name="pdwCookie">A pointer to the variable that will be passed to <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-isimpleframesite-postmessagefilter">ISimpleFrameSite::PostMessageFilter</a> if it is called later. This parameter should only contain allocated data if this method returns S_OK so it will also receive a call to <b>PostMessageFilter</b> which can free the allocation. The caller is not in any way responsible for anything returned in this parameter.</param>
/// <returns>
/// <para>This method can return the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>Successful return values indicate whether the site wishes to allow further processing. S_OK indicates further processing, whereas S_FALSE means do not process further. S_OK also indicates that the control must later call <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-isimpleframesite-postmessagefilter">PostMessageFilter</a>.</remarks>
public unsafe void PreMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint* pdwCookie)
{
((delegate *unmanaged [Stdcall]<ISimpleFrameSite*,winmdroot.Foundation.HWND ,uint ,winmdroot.Foundation.WPARAM ,winmdroot.Foundation.LPARAM ,winmdroot.Foundation.LRESULT* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ISimpleFrameSite*)Unsafe.AsPointer(ref this), hWnd, msg, wp, lp, plResult, pdwCookie).ThrowOnFailure();
}
/// <inheritdoc cref="PostMessageFilter(winmdroot.Foundation.HWND, uint, winmdroot.Foundation.WPARAM, winmdroot.Foundation.LPARAM, winmdroot.Foundation.LRESULT*, uint)"/>
internal unsafe void PostMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, out winmdroot.Foundation.LRESULT plResult, uint dwCookie)
{
fixed (winmdroot.Foundation.LRESULT* plResultLocal = &plResult)
{
this.PostMessageFilter(hWnd, msg, wp, lp, plResultLocal, dwCookie);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT PostMessageFilter(ISimpleFrameSite* pThis, winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint dwCookie)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.PostMessageFilter(hWnd, msg, wp, lp, plResult, dwCookie);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sends the simple frame site a message that is received by a control's own window after the control has processed the message.</summary>
/// <param name="hWnd">A handle of the control window receiving the message.</param>
/// <param name="msg">The message received by the simple frame site.</param>
/// <param name="wp">The <b>WPARAM</b> of the message.</param>
/// <param name="lp">The <b>LPARAM</b> of the message.</param>
/// <param name="plResult">A pointer to the variable that receives the result of the message processing.</param>
/// <param name="dwCookie">The value that was returned by <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nf-ocidl-isimpleframesite-premessagefilter">ISimpleFrameSite::PreMessageFilter</a> through its <i>pdwCookie</i> parameter.</param>
/// <returns>
/// <para>This method can return the following values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-isimpleframesite-postmessagefilter">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void PostMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint dwCookie)
{
((delegate *unmanaged [Stdcall]<ISimpleFrameSite*,winmdroot.Foundation.HWND ,uint ,winmdroot.Foundation.WPARAM ,winmdroot.Foundation.LPARAM ,winmdroot.Foundation.LRESULT* ,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((ISimpleFrameSite*)Unsafe.AsPointer(ref this), hWnd, msg, wp, lp, plResult, dwCookie).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]<ISimpleFrameSite*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<ISimpleFrameSite*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<ISimpleFrameSite*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<ISimpleFrameSite*,winmdroot.Foundation.HWND ,uint ,winmdroot.Foundation.WPARAM ,winmdroot.Foundation.LPARAM ,winmdroot.Foundation.LRESULT* ,uint* ,winmdroot.Foundation.HRESULT> PreMessageFilter_4;
internal delegate *unmanaged [Stdcall]<ISimpleFrameSite*,winmdroot.Foundation.HWND ,uint ,winmdroot.Foundation.WPARAM ,winmdroot.Foundation.LPARAM ,winmdroot.Foundation.LRESULT* ,uint ,winmdroot.Foundation.HRESULT> PostMessageFilter_5;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->PreMessageFilter_4 = &PreMessageFilter;
vtable->PostMessageFilter_5 = &PostMessageFilter;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{742b0e01-14e6-101b-914e-00aa00300cab}</value>
internal static readonly Guid IID_Guid = new Guid(0x742B0E01, 0x14E6, 0x101B, 0x91, 0x4E, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x01,0x0E,0x2B,0x74,0xE6,0x14,0x1B,0x10,0x91,0x4E,0x00,0xAA,0x00,0x30,0x0C,0xAB };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("742B0E01-14E6-101B-914E-00AA00300CAB"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.0")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT PreMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint* pdwCookie);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT PostMessageFilter(winmdroot.Foundation.HWND hWnd, uint msg, winmdroot.Foundation.WPARAM wp, winmdroot.Foundation.LPARAM lp, winmdroot.Foundation.LRESULT* plResult, uint dwCookie);
}
}
}
}
|