C++, How to determine if a Windows Process is running?

前端 未结 13 1171
清酒与你
清酒与你 2020-11-27 15:27

This is concerning Windows XP processes.

I have a process running, let\'s call it Process1. Process1 creates a new process, Process2, and saves its id.

Now,

13条回答
  •  伪装坚强ぢ
    2020-11-27 16:04

    You can use GetExitCodeProcess. It will return STILL_ACTIVE (259) if the process is still running (or if it happened to exit with that exit code :( ).

提交回复
热议问题