// ------------------------------------------------------------------------------ // <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,SYSLIB1092,CS3021,CS3019 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("F8B80ADA-2C44-48D0-89BE-5FF23C9CD875")] [CLSCompliant(false)] [SupportedOSPlatform("windows6.1")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IAccessibleEx :winmdroot.IVTable<IAccessibleEx,IAccessibleEx.Vtbl>,IComIID { /// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] 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]<IAccessibleEx*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IAccessibleEx*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IAccessibleEx*,uint>)lpVtbl[1])((IAccessibleEx*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IAccessibleEx*,uint>)lpVtbl[2])((IAccessibleEx*)Unsafe.AsPointer(ref this)); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetObjectForChild(IAccessibleEx* pThis, int idChild, winmdroot.UI.Accessibility.IAccessibleEx** pRetVal) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetObjectForChild(idChild, pRetVal); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves an IAccessibleEx interface representing the specified child of this element.</summary> /// <param name="idChild"> /// <para>Type: <b>long</b> The identifier of the child element.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-getobjectforchild#parameters">Read more on learn.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><i>pRetVal</i> returns <b>NULL</b> if this implementation does not use child IDs, or cannot provide an <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-iaccessibleex">IAccessibleEx</a> interface for the specified child, or itself represents a child element. <i>idChild</i> must represent an actual MSAA child element, not an object that has its own <a href="https://docs.microsoft.com/windows/desktop/api/oleacc/nn-oleacc-iaccessible">IAccessible</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-getobjectforchild#">Read more on learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.UI.Accessibility.IAccessibleEx* GetObjectForChild(int idChild) { winmdroot.UI.Accessibility.IAccessibleEx* __retVal = default(winmdroot.UI.Accessibility.IAccessibleEx*); ((delegate *unmanaged [Stdcall]<IAccessibleEx*,int ,winmdroot.UI.Accessibility.IAccessibleEx** ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IAccessibleEx*)Unsafe.AsPointer(ref this), idChild, &__retVal).ThrowOnFailure(); return __retVal; } /// <inheritdoc cref="GetIAccessiblePair(winmdroot.UI.Accessibility.IAccessible**, int*)"/> [OverloadResolutionPriority(1)] internal unsafe void GetIAccessiblePair(winmdroot.UI.Accessibility.IAccessible** ppAcc, out int pidChild) { fixed (int* pidChildLocal = &pidChild) { this.GetIAccessiblePair(ppAcc, pidChildLocal); } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetIAccessiblePair(IAccessibleEx* pThis, winmdroot.UI.Accessibility.IAccessible** ppAcc, int* pidChild) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetIAccessiblePair(ppAcc, pidChild); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves the IAccessible interface and child ID for this item.</summary> /// <param name="ppAcc"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/oleacc/nn-oleacc-iaccessible">IAccessible</a>**</b> Receives a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/oleacc/nn-oleacc-iaccessible">IAccessible</a> interface for this object, or the parent object if this is a child element.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-getiaccessiblepair#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="pidChild"> /// <para>Type: <b>long*</b> Receives the child ID, or CHILDID_SELF if this is not a child element.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-getiaccessiblepair#parameters">Read more on learn.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-iaccessibleex-getiaccessiblepair">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe void GetIAccessiblePair(winmdroot.UI.Accessibility.IAccessible** ppAcc, int* pidChild) { ((delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.UI.Accessibility.IAccessible** ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IAccessibleEx*)Unsafe.AsPointer(ref this), ppAcc, pidChild).ThrowOnFailure(); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT GetRuntimeId(IAccessibleEx* pThis, winmdroot.System.Com.SAFEARRAY** pRetVal) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.GetRuntimeId(pRetVal); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves the runtime identifier of this element.</summary> /// <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>The runtime identifier is a provider-defined array of integers, the first item of which must be <b>UiaAppendRuntimeId</b>. The runtime identifier must be unique within the parent window. The MSAA-to-UIA Proxy uses the runtime identifier (together with the window handle) to determine if two interface instances refer to the same underlying element. If <b>IAccessibleEx::GetRuntimeId</b> is not implemented, the proxy performs field-by-field comparisons on the two <a href="https://docs.microsoft.com/windows/desktop/api/oleacc/nn-oleacc-iaccessible">IAccessible</a> objects to determine if they are equivalent, which is less efficient.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-getruntimeid#">Read more on learn.microsoft.com</see>.</para> /// </remarks> public unsafe winmdroot.System.Com.SAFEARRAY* GetRuntimeId() { winmdroot.System.Com.SAFEARRAY* __retVal = default(winmdroot.System.Com.SAFEARRAY*); ((delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IAccessibleEx*)Unsafe.AsPointer(ref this), &__retVal).ThrowOnFailure(); return __retVal; } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT ConvertReturnedElement(IAccessibleEx* pThis, winmdroot.UI.Accessibility.IRawElementProviderSimple* pIn, winmdroot.UI.Accessibility.IAccessibleEx** ppRetValOut) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.ConvertReturnedElement(pIn, ppRetValOut); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Retrieves the IAccessibleEx interface of an element returned as a property value.</summary> /// <param name="pIn"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a>*</b> Pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-irawelementprovidersimple">IRawElementProviderSimple</a> interface that was retrieved as a property.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-convertreturnedelement#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="ppRetValOut"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-iaccessibleex">IAccessibleEx</a>**</b> Receives a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/uiautomationcore/nn-uiautomationcore-iaccessibleex">IAccessibleEx</a> interface of the element.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/uiautomationcore/nf-uiautomationcore-iaccessibleex-convertreturnedelement#parameters">Read more on learn.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>This method is implemented by the bridge between Microsoft UI Automation and Microsoft Active Accessibility. Most other implementations should return E_NOTIMPL after setting <i>ppRetValOut</i> to <b>NULL</b>.</remarks> public unsafe void ConvertReturnedElement(winmdroot.UI.Accessibility.IRawElementProviderSimple* pIn, winmdroot.UI.Accessibility.IAccessibleEx** ppRetValOut) { ((delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.UI.Accessibility.IRawElementProviderSimple* ,winmdroot.UI.Accessibility.IAccessibleEx** ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IAccessibleEx*)Unsafe.AsPointer(ref this), pIn, ppRetValOut).ThrowOnFailure(); } internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv) where T : unmanaged { Guid guid = typeof(T).GUID; void* pv; var hr = this.QueryInterface(&guid, &pv); if (hr.Succeeded) { ppv = (T*)pv; } else { ppv = null; } return hr; } internal struct Vtbl { internal delegate *unmanaged [Stdcall]<IAccessibleEx*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,int ,winmdroot.UI.Accessibility.IAccessibleEx** ,winmdroot.Foundation.HRESULT> GetObjectForChild_4; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.UI.Accessibility.IAccessible** ,int* ,winmdroot.Foundation.HRESULT> GetIAccessiblePair_5; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.System.Com.SAFEARRAY** ,winmdroot.Foundation.HRESULT> GetRuntimeId_6; internal delegate *unmanaged [Stdcall]<IAccessibleEx*,winmdroot.UI.Accessibility.IRawElementProviderSimple* ,winmdroot.UI.Accessibility.IAccessibleEx** ,winmdroot.Foundation.HRESULT> ConvertReturnedElement_7; } public static void PopulateVTable(Vtbl* vtable) { vtable->GetObjectForChild_4 = &GetObjectForChild; vtable->GetIAccessiblePair_5 = &GetIAccessiblePair; vtable->GetRuntimeId_6 = &GetRuntimeId; vtable->ConvertReturnedElement_7 = &ConvertReturnedElement; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{f8b80ada-2c44-48d0-89be-5ff23c9cd875}</value> internal static readonly Guid IID_Guid = new Guid(0xF8B80ADA, 0x2C44, 0x48D0, 0x89, 0xBE, 0x5F, 0xF2, 0x3C, 0x9C, 0xD8, 0x75); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0xDA,0x0A,0xB8,0xF8,0x44,0x2C,0xD0,0x48,0x89,0xBE,0x5F,0xF2,0x3C,0x9C,0xD8,0x75 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("F8B80ADA-2C44-48D0-89BE-5FF23C9CD875"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows6.1")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetObjectForChild(int idChild, winmdroot.UI.Accessibility.IAccessibleEx** pRetVal); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetIAccessiblePair(winmdroot.UI.Accessibility.IAccessible** ppAcc, int* pidChild); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT GetRuntimeId(winmdroot.System.Com.SAFEARRAY** pRetVal); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT ConvertReturnedElement(winmdroot.UI.Accessibility.IRawElementProviderSimple* pIn, winmdroot.UI.Accessibility.IAccessibleEx** ppRetValOut); } } } }