|
// ------------------------------------------------------------------------------
// <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("CF51ED10-62FE-11CF-BF86-00A0C9034836")]
[SupportedOSPlatform("windows5.0")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IQuickActivate
:IVTable<IQuickActivate,IQuickActivate.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]<IQuickActivate*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IQuickActivate*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IQuickActivate*,uint>)lpVtbl[1])((IQuickActivate*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IQuickActivate*,uint>)lpVtbl[2])((IQuickActivate*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="QuickActivate(winmdroot.System.Ole.QACONTAINER*, winmdroot.System.Ole.QACONTROL*)"/>
internal unsafe winmdroot.Foundation.HRESULT QuickActivate(in winmdroot.System.Ole.QACONTAINER pQaContainer, ref winmdroot.System.Ole.QACONTROL pQaControl)
{
fixed (winmdroot.System.Ole.QACONTROL* pQaControlLocal = &pQaControl)
{
fixed (winmdroot.System.Ole.QACONTAINER* pQaContainerLocal = &pQaContainer)
{
winmdroot.Foundation.HRESULT __result = this.QuickActivate(pQaContainerLocal, pQaControlLocal);
return __result;
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT QuickActivate(IQuickActivate* pThis, winmdroot.System.Ole.QACONTAINER* pQaContainer, winmdroot.System.Ole.QACONTROL* pQaControl)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.QuickActivate(pQaContainer, pQaControl);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Quick activates a control.</summary>
/// <param name="pQaContainer">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-qacontainer">QACONTAINER</a> structure containing information about the container.</param>
/// <param name="pQaControl">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-qacontrol">QACONTROL</a> structure filled in by the control to return information about the control to the container. The container calling this method must reserve memory for this structure.</param>
/// <returns>If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.</returns>
/// <remarks>
/// <para>If the control does not support <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/nn-ocidl-iquickactivate">IQuickActivate</a>, the container performs certain handshaking operations when it loads the control. The container calls certain interfaces on the control and the control, in turn, calls back to certain interfaces on the container's client site. First, the container creates the control object and calls <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q)">QueryInterface</a> to query for interfaces that it needs. Then, the container calls <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-ioleobject-setclientsite">IOleObject::SetClientSite</a> on the control, passing a pointer to its client site. Next, the control calls <b>QueryInterface</b> on this site, retrieving a pointer to additional necessary interfaces. Using the <b>QuickActivate</b> method, the container passes a pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-qacontainer">QACONTAINER</a> structure. The structure contains pointers to interfaces which are needed by the control and the values of some ambient properties that the control may need. Upon return, the control passes a pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/ocidl/ns-ocidl-qacontrol">QACONTROL</a> structure that contains pointers to its own interfaces that the container requires, and additional status information. The <b>IPersist*::Load</b> and <b>IPersist*::InitNew</b> methods should be called after quick activation occurs. The control should establish its connections to the container's sinks during quick activation. However, these connections are not live until <b>IPersist*::Load</b> or <b>IPersist*::InitNew</b> has been called.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-iquickactivate-quickactivate#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT QuickActivate(winmdroot.System.Ole.QACONTAINER* pQaContainer, winmdroot.System.Ole.QACONTROL* pQaControl)
{
return ((delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.System.Ole.QACONTAINER* ,winmdroot.System.Ole.QACONTROL* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IQuickActivate*)Unsafe.AsPointer(ref this), pQaContainer, pQaControl);
}
/// <inheritdoc cref="SetContentExtent(winmdroot.Foundation.SIZE*)"/>
internal unsafe winmdroot.Foundation.HRESULT SetContentExtent(in winmdroot.Foundation.SIZE pSizel)
{
fixed (winmdroot.Foundation.SIZE* pSizelLocal = &pSizel)
{
winmdroot.Foundation.HRESULT __result = this.SetContentExtent(pSizelLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetContentExtent(IQuickActivate* pThis, winmdroot.Foundation.SIZE* pSizel)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetContentExtent(pSizel);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the content extent of a control.</summary>
/// <param name="pSizel">The size of the content extent.</param>
/// <returns>If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.</returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-iquickactivate-setcontentextent">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT SetContentExtent(winmdroot.Foundation.SIZE* pSizel)
{
return ((delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.Foundation.SIZE* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IQuickActivate*)Unsafe.AsPointer(ref this), pSizel);
}
/// <inheritdoc cref="GetContentExtent(winmdroot.Foundation.SIZE*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetContentExtent(out winmdroot.Foundation.SIZE pSizel)
{
fixed (winmdroot.Foundation.SIZE* pSizelLocal = &pSizel)
{
winmdroot.Foundation.HRESULT __result = this.GetContentExtent(pSizelLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetContentExtent(IQuickActivate* pThis, winmdroot.Foundation.SIZE* pSizel)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetContentExtent(pSizel);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the content extent of a control.</summary>
/// <param name="pSizel">A pointer to a structure that contains size of the content extent.</param>
/// <returns>If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL.</returns>
/// <remarks>
/// <para>The <b>SIZEL</b> structure is defined in Wtypes.h as follows.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/ocidl/nf-ocidl-iquickactivate-getcontentextent#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetContentExtent(winmdroot.Foundation.SIZE* pSizel)
{
return ((delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.Foundation.SIZE* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IQuickActivate*)Unsafe.AsPointer(ref this), pSizel);
}
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]<IQuickActivate*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IQuickActivate*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IQuickActivate*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.System.Ole.QACONTAINER* ,winmdroot.System.Ole.QACONTROL* ,winmdroot.Foundation.HRESULT> QuickActivate_4;
internal delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.Foundation.SIZE* ,winmdroot.Foundation.HRESULT> SetContentExtent_5;
internal delegate *unmanaged [Stdcall]<IQuickActivate*,winmdroot.Foundation.SIZE* ,winmdroot.Foundation.HRESULT> GetContentExtent_6;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->QuickActivate_4 = &QuickActivate;
vtable->SetContentExtent_5 = &SetContentExtent;
vtable->GetContentExtent_6 = &GetContentExtent;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{cf51ed10-62fe-11cf-bf86-00a0c9034836}</value>
internal static readonly Guid IID_Guid = new Guid(0xCF51ED10, 0x62FE, 0x11CF, 0xBF, 0x86, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0x36);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x10,0xED,0x51,0xCF,0xFE,0x62,0xCF,0x11,0xBF,0x86,0x00,0xA0,0xC9,0x03,0x48,0x36 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("CF51ED10-62FE-11CF-BF86-00A0C9034836"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.0")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT QuickActivate(winmdroot.System.Ole.QACONTAINER* pQaContainer, winmdroot.System.Ole.QACONTROL* pQaControl);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT SetContentExtent(winmdroot.Foundation.SIZE* pSizel);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetContentExtent(winmdroot.Foundation.SIZE* pSizel);
}
}
}
}
|