开发者

Prossess state getting in c under window plateform

开发者 https://www.devze.com 2022-12-24 10:13 出处:网络
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.Us

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

精彩评论

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

关注公众号