IAccessible::get_accSelection

[This is preliminary documentation and subject to change.]

Retrieves the selected children of this object.

HRESULT get_accSelection(
  VARIANT *pvarChildren
);
 

Parameters

pvarChildren
[out, retval] Address of a VARIANT structure that will contain information about the child object or objects. The vt member will be set to one of the following values, indicating the call's result.
VT_DISPATCH One child was selected and the address of its IDispatch interface is set in the pdispVal member.
VT_EMPTY No objects were selected.
VT_I4 One object was selected. The child ID is set in the lVal member. If lVal is CHILDID_SELF, then the object itself had no children but was selected.
VT_UNKNOWN Multiple objects were selected and the punkVal member contains the address of the IUnknown interface. The client can query this interface for the IEnumVARIANT interface, which it can use to enumerate the selected objects.

Return Values

Returns S_OK if successful or a standard COM error code otherwise.

Note to implementers If the object has no children, but is itself selected, set the vt member to VT_I4 and lVal to CHILDID_SELF. If no child is selected, set vt to VT_EMPTY. If multiple children are selected, set vt to VT_UNKNOWN and punkVal to the IUnknown interface pointer of an object that can be used to enumerate the child objects. This object must support the IEnumVARIANT interface.

See Also

Retrieving Selected Objects and Children, VARIANT Structure, IDispatch Interface