IAccIdentity::GetIdentityString method

Retrieves a string of bytes (an identity string) that uniquely identifies an accessible element.

If server developers know the HWND of the object they want to annotate, they can use one of the following methods instead of using this method and getting an identity string.

Syntax

HRESULT GetIdentityString(
  DWORD dwIDChild,
  BYTE  **ppIDString,
  DWORD *pdwIDStringLen
);

Parameters

dwIDChild

Type: DWORD

Specifies which child of the IAccessible object the caller wants to identify.

ppIDString

Type: BYTE**

Address of a variable that receives a pointer to a callee-allocated identity string. The callee allocates the identity string using CoTaskMemAlloc; the caller must release the identity string by using CoTaskMemFree when finished.

pdwIDStringLen

Type: DWORD*

Address of a variable that receives the length, in bytes, of the callee-allocated identity string.

Return value

Type: HRESULT

Return S_OK, except under exceptional error conditions, such as low memory. If not supported, calling QueryInterface on IAccIdentity should fail.

Remarks

The returned string should be considered opaque; clients should use it only as a whole, and should not attempt to dissect it or otherwise interpret it manually.

If a client knows or expects that a string is HWND—based, it can use IAccPropServices::DecomposeHwndIdentityString to attempt to decompose the identity string.

Requirements

   
Minimum supported client Windows Vista or Windows XP
Minimum supported server Windows Server 2003
Target Platform Windows
Header oleacc.h (include OleAcc.h Include Initguid.h first.)
DLL Oleacc.dll
Redistributable Active Accessibility 2.0 RDK on Windows NT 4.0 with SP6 and later and Windows 98