Функция _WinAPI_WaitForInputIdle

 ↑  ←  Описание функции


_WinAPI_WaitForInputIdle

Waits until a process is waiting for user input with no input pending, or a time out

#include <WinAPI.au3>
_WinAPI_WaitForInputIdle($hProcess [, $iTimeout = -1])

Параметры

$hProcess A handle to the process. If this process is a console application or does not have a message
    queue, this function returns immediately.
$iTimeOut [необязательный] The time out interval, in milliseconds. If set to -1, the function does not return until the
    process is idle.

Возвращаемое значение

Успех:Возвращает True
Ошибка:Возвращает False

Примечания

This function causes a thread to suspend execution until the specified process has finished its initialization
and is waiting for user input with no input pending. This can be useful for synchronizing a parent process and
a newly created child process. When a parent process creates a child process, the CreateProcess function
returns without waiting for the child process to finish its initialization. Before trying to communicate with
the child process, the parent process can use this function to determine when the child's initialization has
been completed. This function can be used at any time, not just during application startup.

См. также

Искать WaitForInputIdle в библиотеке MSDN