|
// ------------------------------------------------------------------------------
// <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("85B94ECD-849D-42B6-B94D-D6DB23FDF5A4")]
[SupportedOSPlatform("windows6.1")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IUIAutomationProxyFactory
:IVTable<IUIAutomationProxyFactory,IUIAutomationProxyFactory.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]<IUIAutomationProxyFactory*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IUIAutomationProxyFactory*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,uint>)lpVtbl[1])((IUIAutomationProxyFactory*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,uint>)lpVtbl[2])((IUIAutomationProxyFactory*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT CreateProvider(IUIAutomationProxyFactory* pThis, winmdroot.Foundation.HWND hwnd, int idObject, int idChild, winmdroot.UI.Accessibility.IRawElementProviderSimple** provider)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.CreateProvider(hwnd, idObject, idChild, provider);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Creates a proxy object that provides Microsoft UI Automation support for a UI element.</summary>
/// <param name="hwnd">
/// <para>Type: <b>UIA_HWND</b> The window handle of the UI element.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationproxyfactory-createprovider#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="idObject">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LONG</a></b> The object ID. See Remarks.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationproxyfactory-createprovider#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="idChild">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">LONG</a></b> The child ID. See Remarks.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationproxyfactory-createprovider#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>The <i>idObject</i> parameter is normally <a href="https://docs.microsoft.com/windows/desktop/WinAuto/object-identifiers">OBJID_CLIENT</a>, and <i>idChild</i> is normally CHILDID_SELF. However, when the method is called in response to a registered WinEvent, these values are from the event, specifying the subelement that raised the event.</remarks>
public unsafe winmdroot.UI.Accessibility.IRawElementProviderSimple* CreateProvider(winmdroot.Foundation.HWND hwnd, int idObject, int idChild)
{
winmdroot.UI.Accessibility.IRawElementProviderSimple* __retVal = default(winmdroot.UI.Accessibility.IRawElementProviderSimple*);
((delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,winmdroot.Foundation.HWND ,int ,int ,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IUIAutomationProxyFactory*)Unsafe.AsPointer(ref this), hwnd, idObject, idChild, &__retVal).ThrowOnFailure();
return __retVal;
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT get_ProxyFactoryId(IUIAutomationProxyFactory* pThis, winmdroot.Foundation.BSTR* factoryId)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
*factoryId = __object.ProxyFactoryId;
return winmdroot.Foundation.HRESULT.S_OK;
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the identifier of the proxy factory.</summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationproxyfactory-get_proxyfactoryid">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
internal winmdroot.Foundation.BSTR ProxyFactoryId
{
get
{
winmdroot.Foundation.BSTR __result;
((delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IUIAutomationProxyFactory*)Unsafe.AsPointer(ref this), &__result).ThrowOnFailure();
return __result;
}
}
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]<IUIAutomationProxyFactory*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,winmdroot.Foundation.HWND ,int ,int ,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT> CreateProvider_4;
internal delegate *unmanaged [Stdcall]<IUIAutomationProxyFactory*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> get_ProxyFactoryId_5;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->CreateProvider_4 = &CreateProvider;
vtable->get_ProxyFactoryId_5 = &get_ProxyFactoryId;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{85b94ecd-849d-42b6-b94d-d6db23fdf5a4}</value>
internal static readonly Guid IID_Guid = new Guid(0x85B94ECD, 0x849D, 0x42B6, 0xB9, 0x4D, 0xD6, 0xDB, 0x23, 0xFD, 0xF5, 0xA4);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xCD,0x4E,0xB9,0x85,0x9D,0x84,0xB6,0x42,0xB9,0x4D,0xD6,0xDB,0x23,0xFD,0xF5,0xA4 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("85B94ECD-849D-42B6-B94D-D6DB23FDF5A4"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows6.1")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT CreateProvider(winmdroot.Foundation.HWND hwnd, int idObject, int idChild, winmdroot.UI.Accessibility.IRawElementProviderSimple** provider);
winmdroot.Foundation.BSTR ProxyFactoryId
{
get;
}
}
}
}
}
|