UiaProviderFromIAccessible function

Creates a Microsoft UI Automation provider based on the specified Microsoft Active Accessibility object.

Syntax


HRESULT UiaProviderFromIAccessible(
  _In_   IAccessible *pAccessible,
  _In_   long idChild,
  _In_   DWORD dwFlags,
  _Out_  IRawElementProviderSimple **pProvider
);

Parameters

pAccessible [in]

Type: IAccessible*

A pointer to the Microsoft Active Accessibility object.

idChild [in]

Type: long

The child ID of the Microsoft Active Accessibility object.

dwFlags [in]

Type: DWORD

One of the following values:

UIA_PFIA_DEFAULT
UIA_PFIA_UNWRAP_BRIDGE
pProvider [out]

Type: IRawElementProviderSimple**

The new UI Automation provider.

Return value

Type: HRESULT

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

Remarks

UI Automation provides backward compatibility for Microsoft Active Accessibility providers by supplying a proxy for them, called the Microsoft Active Accessibility to UI Automation proxy. This proxy is created automatically when a window responds to a WM_GETOBJECT message by returning a Microsoft Active Accessibility provider. Use UiaProviderFromIAccessible when you need to create a Microsoft Active Accessibility to UI Automation proxy manually; for example, when implementing the IAccessibleEx interface.

Some properties, such as LabeledBy, must be expressed as a UI Automation provider. An IAccessibleEx provider can use UiaProviderFromIAccessible to wrap an IAccessible object to return it as the value of the LabeledBy property.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

UIAutomationCoreApi.h

Library

Uiautomationcore.lib

DLL

Uiautomationcore.dll

See also

Functions for Providers
UiaIAccessibleFromProvider

 

 

Community Additions

ADD
Show:
© 2014 Microsoft