IAccessibleEx::GetRuntimeId method

Retrieves the runtime identifier of this element.

Syntax

HRESULT GetRuntimeId(
  SAFEARRAY **pRetVal
);

Parameters

pRetVal

Type: SAFEARRAY**

Receives a pointer to the runtime identifier.

Return Value

Type: HRESULT

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

Remarks

The runtime identifier is a provider-defined array of integers, the first item of which must be UiaAppendRuntimeId. The runtime identifier must be unique within the parent window.

The MSAA-to-UIA Proxy uses the runtime identifier (together with the window handle) to determine if two interface instances refer to the same underlying element. If IAccessibleEx::GetRuntimeId is not implemented, the proxy performs field-by-field comparisons on the two IAccessible objects to determine if they are equivalent, which is less efficient.

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 | UWP apps]
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 | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See Also

Best Practices for Using Safe Arrays

Conceptual

IAccessibleEx

Reference