网站首页  词典首页

请输入您要查询的函数:

 

术语 waitforinputidle
释义 WaitForInputIdle
语法:
C++
DWORD WINAPI WaitForInputIdle(
__in HANDLE hProcess,
__in DWORD dwMilliseconds
);
WaitForInputIdle功能
等待,直到指定的进程已完成初步处理意见,并正在等待用户输入没有输入悬而未决,或直至超时时间间隔的时间。
参数
hProcess [in]
句柄的进程。如果这个过程是一个控制台应用程序或没有消息队列,WaitForInputIdle立即返回。
dwMilliseconds的 [in]
在超时间隔时间,以毫秒为单位。如果dwMilliseconds的是无限的,该函数不返回,直到该进程处于闲置状态。
返回值
下表显示了此功能可能的返回值。
返回代码/ valueDescription
0The等待成功感到满意。
WAIT_TIMEOUTThe等待被终止,因为超时间隔时间。
WAIT_FAILEDAn发生错误。
备注
该WaitForInputIdle功能使一个线程暂停,直到指定的进程的执行已完成它的初始化并等待没有输入用户输入悬而未决。如果进程有多个线程,WaitForInputIdle函数返回尽快任何线程变为空闲。
WaitForInputIdle可以随时使用,而不是在应用程序启动。然而,只有一次WaitForInputIdle等待一个进程,成为闲置;随后WaitForInputIdle要求立即返回,该进程是否是空闲或忙碌。
WaitForInputIdle可以是有益的同步父进程和新创建的子进程。当一个父进程创建一个子进程,而不必等待子进程完成它的初始化CreateProcess函数返回。然后再尝试与孩子沟通的过程中,父进程可以使用函数来确定WaitForInputIdle当孩子的初始化工作已经完成。例如,父进程应该使用之前,试图找到与子进程相关联的窗口WaitForInputIdle功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
CreateProcess的
进程和线程函数
同步多线程的执行
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==WaitForInputIdle Function
Waits until the specified process has finished processing its initial input and is waiting for user input with no input pending, or until the time-out interval has elapsed.
Syntax
C++
DWORD WINAPI WaitForInputIdle(
__in HANDLE hProcess,
__in DWORD dwMilliseconds
);
Parameters
hProcess [in]
A handle to the process. If this process is a console application or does not have a message queue, WaitForInputIdle returns immediately.
dwMilliseconds [in]
The time-out interval, in milliseconds. If dwMilliseconds is INFINITE, the function does not return until the process is idle.
Return Value
The following table shows the possible return values for this function.
Return code/valueDescription
0The wait was satisfied successfully.
WAIT_TIMEOUTThe wait was terminated because the time-out interval elapsed.
WAIT_FAILEDAn error occurred.

Remarks
The WaitForInputIdle function enables a thread to suspend its execution until the specified process has finished its initialization and is waiting for user input with no input pending. If the process has multiple threads, the WaitForInputIdle function returns as soon as any thread becomes idle.
WaitForInputIdle can be used at any time, not just during application startup. However, WaitForInputIdle waits only once for a process to become idle; subsequent WaitForInputIdle calls return immediately, whether the process is idle or busy.
WaitForInputIdle 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 the WaitForInputIdle function to determine when the child's initialization has been completed. For example, the parent process should use the WaitForInputIdle function before trying to find a window associated with the child process.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
CreateProcess
Process and Thread Functions
Synchronizing Execution of Multiple Threads
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms687022(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:25:58