Export (0) Print
Expand All

IAccessibleHandler::AccessibleObjectFromID method

The AccessibleObjectFromID method retrieves an IAccessible interface pointer for the interface associated with the given object ID. Oleacc.dll uses this method to obtain an IAccessible interface pointer for proxies that are supplied by other code.

Note  IAccessibleHandler::AccessibleObjectFromID is deprecated and should not be used.

Syntax


HRESULT AccessibleObjectFromID(
  [in]   long hwnd,
  [in]   long lObjectID,
  [out]  LPACCESSIBLE *pIAccessible
);

Parameters

hwnd [in]

Type: long

Specifies the handle of a window for which an IAccessible interface pointer is to be retrieved.

lObjectID [in]

Type: long

Specifies the object ID. This value is one of the standard object identifier constants or a custom object ID.

pIAccessible [out]

Type: LPACCESSIBLE*

Specifies the address of a pointer variable that receives the address of the object's IAccessible interface.

Return value

Type: HRESULT

If successful, returns S_OK.

If not successful, returns one of the following or another standard COM error code.

ErrorDescription
E_INVALIDARG

An argument is not valid.

E_NOINTERFACE

The requested interface is not supported.

 

Remarks

Oleacc calls this function to obtain an IAccessible interface pointer for HWNDs that have the class name that this handler is registered for.

At startup, Oleacc looks in the registry key HKLM\SOFTWARE\Microsoft\Active Accessibility\Handlers and enumerates over each subkey (Oleacc expects the subkey to be a GUID). Oleacc reads the associated class name from HKCR\CLSID\{guid}\AccClassName, where {guid} was the GUID found under the HKLM\SOFTWARE\Microsoft\Active Accessibility\Handlers key. When Oleacc finds a window with a class name that matches the GUID, it CoCreates the object using the GUID, retrieves the IAccessibleHandler interface pointer, and calls AccessibleObjectFromID on it to get at IAccessible interface pointer.

As with other IAccessible methods and functions, clients might receive errors for IAccessible interface pointers because of a user action. For more information, see Receiving Errors for IAccessible Interface Pointers.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Redistributable

Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95

Header

Oleacc.h

Library

Oleacc.lib

DLL

Oleacc.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft