|
// ------------------------------------------------------------------------------
// <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("D6DD68D1-86FD-4332-8666-9ABEDEA2D24C")]
[SupportedOSPlatform("windows5.1.2600")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IRawElementProviderSimple
:IVTable<IRawElementProviderSimple,IRawElementProviderSimple.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]<IRawElementProviderSimple*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,uint>)lpVtbl[1])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,uint>)lpVtbl[2])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="get_ProviderOptions(winmdroot.UI.Accessibility.ProviderOptions*)"/>
internal unsafe winmdroot.Foundation.HRESULT get_ProviderOptions(out winmdroot.UI.Accessibility.ProviderOptions pRetVal)
{
fixed (winmdroot.UI.Accessibility.ProviderOptions* pRetValLocal = &pRetVal)
{
winmdroot.Foundation.HRESULT __result = this.get_ProviderOptions(pRetValLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT get_ProviderOptions(IRawElementProviderSimple* pThis, winmdroot.UI.Accessibility.ProviderOptions* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.get_ProviderOptions(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Specifies the type of Microsoft UI Automation provider; for example, whether it is a client-side (proxy) or server-side provider.</summary>
/// <remarks>
/// <para>The method must return either <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-provideroptions">ProviderOptions_ServerSideProvider</a> or <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/ne-uiautomationcore-provideroptions">ProviderOptions_ClientSideProvider</a>. UI Automation handles the various types of providers differently. For example, events from a server-side provider are broadcast to all listening clients, but events from client-side (proxy) providers remain in the client.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-get_provideroptions#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT get_ProviderOptions(winmdroot.UI.Accessibility.ProviderOptions* pRetVal)
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.ProviderOptions* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this), pRetVal);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPatternProvider(IRawElementProviderSimple* pThis, winmdroot.UI.Accessibility.UIA_PATTERN_ID patternId, winmdroot.System.Com.IUnknown** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPatternProvider(patternId, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a pointer to an object that provides support for a control pattern on a Microsoft UI Automation element.</summary>
/// <param name="patternId">
/// <para>Type: <b>PATTERNID</b> The identifier of the control pattern. For a list of control pattern IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-controlpattern-ids">Control Pattern Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpatternprovider#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/unknwn/nn-unknwn-iunknown">IUnknown</a>**</b> Receives a pointer to the object that supports the control pattern, or <b>NULL</b> if the control pattern is not supported. This parameter is passed uninitialized.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpatternprovider#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><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpatternprovider">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetPatternProvider(winmdroot.UI.Accessibility.UIA_PATTERN_ID patternId, winmdroot.System.Com.IUnknown** pRetVal)
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.UIA_PATTERN_ID ,winmdroot.System.Com.IUnknown** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this), patternId, pRetVal);
}
/// <inheritdoc cref="GetPropertyValue(winmdroot.UI.Accessibility.UIA_PROPERTY_ID, winmdroot.System.Variant.VARIANT*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetPropertyValue(winmdroot.UI.Accessibility.UIA_PROPERTY_ID propertyId, out winmdroot.System.Variant.VARIANT pRetVal)
{
fixed (winmdroot.System.Variant.VARIANT* pRetValLocal = &pRetVal)
{
winmdroot.Foundation.HRESULT __result = this.GetPropertyValue(propertyId, pRetValLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPropertyValue(IRawElementProviderSimple* pThis, winmdroot.UI.Accessibility.UIA_PROPERTY_ID propertyId, winmdroot.System.Variant.VARIANT* pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPropertyValue(propertyId, pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the value of a property supported by the Microsoft UI Automation provider.</summary>
/// <param name="propertyId">
/// <para>Type: <b>PROPERTYID</b> The property identifier. For a list of property IDs, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-entry-propids">Property Identifiers</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpropertyvalue#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pRetVal">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/WinAuto/variant-structure">VARIANT</a>*</b> Receives the property value, or <b>VT_EMPTY</b> if the property is not supported by this provider. This parameter is passed uninitialized. See Remarks.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpropertyvalue#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 <a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">HRESULT</a> error code. If the provider does not support the <i>propertyId</i> property, the provider should set <i>pRetVal->vt</i> to <b>VT_EMPTY</b> and return <b>S_OK</b>.</para>
/// </returns>
/// <remarks>
/// <para>If a provider is explicitly hiding the property value (that is, the provider does not supply the property, and the request is not to be passed through to other providers), it should return a pointer obtained by using the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiagetreservednotsupportedvalue">UiaGetReservedNotSupportedValue</a> function. For example:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-getpropertyvalue#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetPropertyValue(winmdroot.UI.Accessibility.UIA_PROPERTY_ID propertyId, winmdroot.System.Variant.VARIANT* pRetVal)
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.UIA_PROPERTY_ID ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this), propertyId, pRetVal);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT get_HostRawElementProvider(IRawElementProviderSimple* pThis, winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.get_HostRawElementProvider(pRetVal);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Specifies the host provider for this element.</summary>
/// <remarks>
/// <para>This property is generally the Microsoft UI Automation provider for the window of a custom control. UI Automation uses this provider in combination with the custom provider. For example, the runtime identifier of the element is usually obtained from the host provider. A host provider must be returned in the following cases: when the element is a fragment root, when the element is a simple element (such as a push button), and when the provider is a repositioning placeholder (for more information, see <a href="https://docs.microsoft.com/windows/desktop/WinAuto/uiauto-serversideprovider">Provider Repositioning</a>). In other cases, the property should be <b>NULL</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-irawelementprovidersimple-get_hostrawelementprovider#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT get_HostRawElementProvider(winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal)
{
return ((delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IRawElementProviderSimple*)Unsafe.AsPointer(ref this), 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]<IRawElementProviderSimple*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.ProviderOptions* ,winmdroot.Foundation.HRESULT> get_ProviderOptions_4;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.UIA_PATTERN_ID ,winmdroot.System.Com.IUnknown** ,winmdroot.Foundation.HRESULT> GetPatternProvider_5;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.UIA_PROPERTY_ID ,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> GetPropertyValue_6;
internal delegate *unmanaged [Stdcall]<IRawElementProviderSimple*,winmdroot.UI.Accessibility.IRawElementProviderSimple** ,winmdroot.Foundation.HRESULT> get_HostRawElementProvider_7;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->get_ProviderOptions_4 = &get_ProviderOptions;
vtable->GetPatternProvider_5 = &GetPatternProvider;
vtable->GetPropertyValue_6 = &GetPropertyValue;
vtable->get_HostRawElementProvider_7 = &get_HostRawElementProvider;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{d6dd68d1-86fd-4332-8666-9abedea2d24c}</value>
internal static readonly Guid IID_Guid = new Guid(0xD6DD68D1, 0x86FD, 0x4332, 0x86, 0x66, 0x9A, 0xBE, 0xDE, 0xA2, 0xD2, 0x4C);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xD1,0x68,0xDD,0xD6,0xFD,0x86,0x32,0x43,0x86,0x66,0x9A,0xBE,0xDE,0xA2,0xD2,0x4C };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("D6DD68D1-86FD-4332-8666-9ABEDEA2D24C"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.1.2600")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT get_ProviderOptions(winmdroot.UI.Accessibility.ProviderOptions* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPatternProvider(winmdroot.UI.Accessibility.UIA_PATTERN_ID patternId, winmdroot.System.Com.IUnknown** pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPropertyValue(winmdroot.UI.Accessibility.UIA_PROPERTY_ID propertyId, winmdroot.System.Variant.VARIANT* pRetVal);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT get_HostRawElementProvider(winmdroot.UI.Accessibility.IRawElementProviderSimple** pRetVal);
}
}
}
}
|