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.


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




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


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.


Type: DWORD*

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

Return value


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


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.


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