SelectionPattern_GetSelection Function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation COM interfaces instead.

Retrieves all items in the selection container that are currently selected.

Syntax

HRESULT SelectionPattern_GetSelection(      
    HUIAPATTERNOBJECT hobj,
    SAFEARRAY **pRetVal
);

Parameters

  • hobj
    [in] The control pattern object.
  • pRetVal
    [out] When this function returns, contains a pointer to an array of UI Automation elements representing the selected items. This parameter is passed uninitialized.

Return Value

Returns S_OK if successful or an error value otherwise.

Function Information

Stock Implementation uiautomationcore.dll
Custom Implementation No
Header uiautomationcoreapi.h
Import library uiautomationcore.lib
Minimum operating systems Windows XP