|
// ------------------------------------------------------------------------------
// <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 UI.Accessibility
{
[Guid("1D5DF27C-8947-4425-B8D9-79787BB460B8")]
[SupportedOSPlatform("windows5.1.2600")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IRawElementProviderHwndOverride
:IVTable<IRawElementProviderHwndOverride,IRawElementProviderHwndOverride.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]<IRawElementProviderHwndOverride*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IRawElementProviderHwndOverride*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,uint>)lpVtbl[1])((IRawElementProviderHwndOverride*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,uint>)lpVtbl[2])((IRawElementProviderHwndOverride*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetOverrideProviderForHwnd(IRawElementProviderHwndOverride* pThis, winmdroot.Foundation.HWND hwnd, winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetOverrideProviderForHwnd(hwnd, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets a UI Automation provider for the specified element.</summary>
/// <param name="hwnd">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HWND</a></b> The window handle of the element.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderhwndoverride-getoverrideproviderforhwnd#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRetVal">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>**</b> Receives a pointer to the new provider for the specified window, or <b>NULL</b> if the provider is not being overridden. This parameter is passed uninitialized.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderhwndoverride-getoverrideproviderforhwnd#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a></b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para>This method is implemented by fragment roots that contain window-based child elements. By default, controls hosted in windows are served by default providers in addition to any custom providers. The default providers treat all windows within a parent window as siblings. If you want to restructure the UI Automation tree so that one window-based control is seen as a child of another, you must override the default provider by implementing this method on the fragment root. The returned provider can supply additional properties or override properties of the specified component. The returned provider must be part of the fragment tree. It can supply additional properties or override properties of the specified component. If the returned provider implements <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementproviderfragment">IRawElementProviderFragment</a>, the provider should be part of the fragment's tree and be reachable by navigating from the fragment's root.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementproviderhwndoverride-getoverrideproviderforhwnd#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetOverrideProviderForHwnd(winmdroot.Foundation.HWND hwnd, winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal)
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,winmdroot.Foundation.HWND ,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IRawElementProviderHwndOverride*)Unsafe.AsPointer(ref this), hwnd, pRetVal);
}
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]<IRawElementProviderHwndOverride*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IRawElementProviderHwndOverride*,winmdroot.Foundation.HWND ,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT> GetOverrideProviderForHwnd_4;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->GetOverrideProviderForHwnd_4 = &GetOverrideProviderForHwnd;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{1d5df27c-8947-4425-b8d9-79787bb460b8}</value>
internal static readonly Guid IID_Guid = new Guid(0x1D5DF27C, 0x8947, 0x4425, 0xB8, 0xD9, 0x79, 0x78, 0x7B, 0xB4, 0x60, 0xB8);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x7C,0xF2,0x5D,0x1D,0x47,0x89,0x25,0x44,0xB8,0xD9,0x79,0x78,0x7B,0xB4,0x60,0xB8 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("1D5DF27C-8947-4425-B8D9-79787BB460B8"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.1.2600")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetOverrideProviderForHwnd(winmdroot.Foundation.HWND hwnd, winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal);
}
}
}
}
|