Export (0) Print
Expand All

IUIAutomationSynchronizedInputPattern::StartListening Method

Causes the Microsoft UI Automation provider to start listening for mouse or keyboard input.

Syntax


HRESULT StartListening(          SynchronizedInputType inputType
);

Parameters

inputType
[in] A combination of values from the SynchronizedInputType enumerated type specifying the type of input for which to listen.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

When matching input is found, the provider checks whether the target element matches the current element. If they match, the provider raises the UIA_InputReachedTargetEventId event; otherwise it raises the UIA_InputReachedOtherElementEventId or UIA_InputDiscardedEventId event.

After receiving input of the specified type, the provider stops checking for input and continues as normal.

If the provider is already listening for input, this method returns E_INVALIDOPERATION.

See Also

IUIAutomationSynchronizedInputPattern

Community Additions

Show:
© 2015 Microsoft