Share via


IAccessibleEx::GetRuntimeId Method

Retrieves the runtime identifier of this element.

Syntax

HRESULT GetRuntimeId(      
    SAFEARRAY *pRetval
);

Parameters

  • pRetval
    [out] The address of a SAFEARRAY that receives the runtime identifier.

Return Value

Returns S_OK if successful, or an error value otherwise.

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.

See Also

IAccessibleEx, Working with Safe Arrays