如何检测进程/线程何时在等待用户输入 [英] How to detect when a process/ thread is waiting for user input

查看:85
本文介绍了如何检测进程/线程何时在等待用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以检测Windows进程何时在等待用户输入.

Is there a way to detect when a windows process is waiting for user input.

例如,当您单击某个特定程序时,它会加载,在这种情况下,该程序的进程可能处于加载状态?

For instance, when you click on a particular program it loads, in this case the program's process is probably in loading state rite?

当程序完全加载并且正在等待用户输入到下一步的过程时,会发生什么情况.有没有办法检测到这个?

what happens when the program is fully loaded and is waiting for user input to procedure to next step. Is there a way to detect this?

欢呼

推荐答案

致电 WaitForInputIdle ,带有进程的句柄.它将暂停执行,直到程序完成初始化并等待用户输入且没有待处理的输入为止.

Call WaitForInputIdle with a handle to a process. it will suspend execution until the program completes its initialization and is waiting for user input with no input pending.

这篇关于如何检测进程/线程何时在等待用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆