[solved]Process Handle in Windows

Hi all
Is there any difference b/w process handle and pid.
if so how i can get HANDLE of all processes.
Thanks
Last edited on
Alas, they are different things.

Use the "snapshot" API to enumerate all processes.

Good luck!
Thanks for reply.
actually i found enumprocess() to do same thing .

My motive is to get notify when any process(.exe) gets closed/quit .I need some events/signal that can notify me that this process is terminated.
is there any way ?
Unless you are writing a system-level service, you don't need to know.
Focus on the processes that 'belong' to you.

Use http://www.google.com/search?btnI=1&q=msdn+WaitForMultipleObjects
(or the Ex version, depending on your need.)
Yes. Call WaitForSingleObject on the process handle.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms687032%28v=vs.85%29.aspx
Topic archived. No new replies allowed.