Export (0) Print
Expand All

IWindowProvider::WaitForInputIdle method

Causes the calling code to block for the specified time or until the associated process enters an idle state, whichever completes first.

Syntax


HRESULT WaitForInputIdle(
  [in]           int milliseconds,
  [out, retval]  BOOL *pRetVal
);

Parameters

milliseconds [in]

Type: int

The amount of time, in milliseconds, to wait for the associated process to become idle. The maximum is Int32.MaxValue.

pRetVal [out, retval]

Type: BOOL*

Receives TRUE if the window has entered the idle state; FALSE if the time-out occurred. This parameter is passed uninitialized.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is typically used in conjunction with the handling of a UIA_Window_WindowOpenedEventId. The implementation is dependent on the underlying application framework; therefore this method might 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 pRetVal to determine if the window is ready for input or if the method timed out.

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

IWindowProvider
UI Automation Providers Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft