Expand Minimize

IUIAutomation::ElementFromIAccessible method

Retrieves a UI Automation element for the specified accessible object from a Microsoft Active Accessibility server.

Syntax


HRESULT ElementFromIAccessible(
  [in]           IAccessible *accessible,
  [in]           int childId,
  [out, retval]  IUIAutomationElement **element
);

Parameters

accessible [in]

Type: IAccessible*

A pointer to the IAccessible interface of the accessible object.

childId [in]

Type: int

The child ID of the accessible object.

element [out, retval]

Type: IUIAutomationElement**

Receives a pointer to the UI Automation element.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method enables UI Automation clients to get IUIAutomationElement interfaces for accessible objects implemented by a Microsoft Active Accessiblity server.

This method may fail if the server implements UI Automation provider interfaces alongside Microsoft Active Accessibility support.

The method returns E_INVALIDARG if the underlying implementation of the Microsoft UI Automation element is not a native Microsoft Active Accessibility server; that is, if a client attempts to retrieve the IAccessible interface for an element originally supported by a proxy object from Oleacc.dll, or by the UIA-to-MSAA Bridge.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

IUIAutomation
IUIAutomation::ElementFromHandleBuildCache

 

 

Community Additions

ADD
Show:
© 2015 Microsoft