WindowPattern_WaitForInputIdle function (uiautomationcoreapi.h)
Syntax
HRESULT WindowPattern_WaitForInputIdle(
[in] HUIAPATTERNOBJECT hobj,
[in] int milliseconds,
[out] BOOL *pResult
);
Parameters
[in] hobj
Type: HUIAPATTERNOBJECT
The control pattern object.
[in] milliseconds
Type: int
The number of milliseconds to wait before retrieving pResult.
[out] pResult
Type: BOOL*
TRUE if the window is ready to accept user input; otherwise FALSE.
Return value
Type: HRESULT
Returns S_OK if successful or an error value otherwise.
Remarks
This method is typically used in conjunction with the handling of a WindowOpenedEvent (Window_WindowOpened_Event_GUID). The implementation is dependent on the underlying application framework; therefore this method may return some time after the window is ready for user input. The calling code should not rely on this method to ascertain exactly when the window has become idle. Use the value of pResult to determine if the window is ready for input or if the method timed out.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationcoreapi.h |
Library | Uiautomationcore.lib |
DLL | Uiautomationcore.dll |