WindowPattern_WaitForInputIdle Function
Note This function is deprecated. Client applications should use the Microsoft UI Automation COM interfaces instead.
Causes the calling code to block for the specified time or until the associated process enters an idle state, whichever completes first.
Syntax
HRESULT WindowPattern_WaitForInputIdle( HUIAPATTERNOBJECT hobj, int milliseconds, BOOL *pResult );
Parameters
- hobj
[in] The control pattern object.- milliseconds
[in] The number of milliseconds to wait before retrieving pResult.- pResult
[out] TRUE if the window is ready to accept user input; otherwise FALSE.
Return Value
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.
Function Information
Stock Implementation uiautomationcore.dll Custom Implementation No Header uiautomationcoreapi.h Import library uiautomationcore.lib Minimum operating systems Windows XP