|
// ------------------------------------------------------------------------------
// <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("40A050A0-3C31-101B-A82E-08002B2B2337")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IVBGetControl
:IVTable<IVBGetControl,IVBGetControl.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]<IVBGetControl*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IVBGetControl*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IVBGetControl*,uint>)lpVtbl[1])((IVBGetControl*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IVBGetControl*,uint>)lpVtbl[2])((IVBGetControl*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT EnumControls(IVBGetControl* pThis, uint dwOleContF, winmdroot.System.Ole.ENUM_CONTROLS_WHICH_FLAGS dwWhich, winmdroot.System.Com.IEnumUnknown** ppenumUnk)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.EnumControls(dwOleContF, dwWhich, ppenumUnk);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Enumerates the controls on the form.</summary>
/// <param name="dwOleContF">
/// <para>Specifies the type of OLE objects to be enumerated. This parameter can be one of the following values enumerated by the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/ne-oleidl-olecontf">OLECONTF</a> enumeration. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/vbinterf/nf-vbinterf-ivbgetcontrol-enumcontrols#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="dwWhich"></param>
/// <param name="ppenumUnk">Pointer to an enumeration of OLE objects.</param>
/// <returns>
/// <para>This method supports the standard return values <b>E_INVALIDARG</b>, <b>E_OUTOFMEMORY</b>, and <b>E_UNEXPECTED</b>, as well as the following:</para>
/// </returns>
/// <remarks>
/// <para>When migrating a VBX control to an OLE control, <b>EnumControls</b> replaces the Visual Basic <b>VBGetControl</b>, which is no longer supported.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/vbinterf/nf-vbinterf-ivbgetcontrol-enumcontrols#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void EnumControls(uint dwOleContF, winmdroot.System.Ole.ENUM_CONTROLS_WHICH_FLAGS dwWhich, winmdroot.System.Com.IEnumUnknown** ppenumUnk)
{
((delegate *unmanaged [Stdcall]<IVBGetControl*,uint ,winmdroot.System.Ole.ENUM_CONTROLS_WHICH_FLAGS ,winmdroot.System.Com.IEnumUnknown** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IVBGetControl*)Unsafe.AsPointer(ref this), dwOleContF, dwWhich, ppenumUnk).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]<IVBGetControl*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IVBGetControl*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IVBGetControl*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IVBGetControl*,uint ,winmdroot.System.Ole.ENUM_CONTROLS_WHICH_FLAGS ,winmdroot.System.Com.IEnumUnknown** ,winmdroot.Foundation.HRESULT> EnumControls_4;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->EnumControls_4 = &EnumControls;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{40a050a0-3c31-101b-a82e-08002b2b2337}</value>
internal static readonly Guid IID_Guid = new Guid(0x40A050A0, 0x3C31, 0x101B, 0xA8, 0x2E, 0x08, 0x00, 0x2B, 0x2B, 0x23, 0x37);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xA0,0x50,0xA0,0x40,0x31,0x3C,0x1B,0x10,0xA8,0x2E,0x08,0x00,0x2B,0x2B,0x23,0x37 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("40A050A0-3C31-101B-A82E-08002B2B2337"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT EnumControls(uint dwOleContF, winmdroot.System.Ole.ENUM_CONTROLS_WHICH_FLAGS dwWhich, winmdroot.System.Com.IEnumUnknown** ppenumUnk);
}
}
}
}
|