Ending processes notification
-
Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.
-
Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.
ummmm unfortunately its not so easy to get notified of things happening in other parts of the system ... thats why the process viewer in winnt polls every few seconds and gets a snapshot of whats happening theres a styling article in an old copy of msj (jan 1999 - nerditorium) thats suggests using a fake kernel mode driver that can send notification to the user mode app across the dark divide from the kernel where it all happens (yeah yeah) check it out ... i think it'll answer you're question :cool: mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
-
Hello. I'm working on an application that displays processes state. I manage to get their handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ? I understand that I probably have to implement callback functions, but how ? Do I have to use "RegisterWaitForSingleObject" function ? Thanks.
If you can't get the notification - and I can't think of it at the moment, you can poll for the termination of the application using GetExitCodeProcess(). This will either tell you the process is still alive, or give you its exit code. Not ideal, but a start. Stepehn Kellett