ISynchronizedInputProvider::StartListening method (uiautomationcore.h)
Starts listening for input of the specified type.
Syntax
HRESULT StartListening(
[in] SynchronizedInputType inputType
);
Parameters
[in] inputType
Type: SynchronizedInputType
The type of input that is requested to be synchronized.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
When it finds matching input, the provider checks if the target UI Automation 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. The UI Automation provider must discard the input if it is for an element other than this one.
This is a one-shot method; after receiving input, the provider stops listening and continues normally.
This method returns E_INVALIDOPERATION if the provider is already listening for input.
Requirements
Requirement | Value |
---|---|
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for