开发者

Prossess state getting in c under window plateform

I am using 开发者_开发知识库CreateProcess function for creating the process, is there any option to get the current state of the process (running or not). Kindly guide me how can I make it possible.


Use OpenProcess function with that dwProcessId if it returns NULL Process is not running otherwise it will return handle to that process


Create process returns a handle to the process in PROCESS_INFORMATION structure, you can use this with something like GetExitCodeProcess to work out if it is still running, or you can use the wait functions to wait for it to exit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜