Link to home
Start Free TrialLog in
Avatar of bitnal
bitnal

asked on

Process status with given pid

I have a list of PIDs in a flat file and have to find out if any of those are inactive .
Any pointers on how to do this?
Platform: Windows NT
This info has to be read and processed within a MFC GUI.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of mnashadka
mnashadka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AssafLavie
AssafLavie

What do you mean by 'inactive'? Shut down?
Anyway, IIRC, you can use the pid's with OpenProcess and see if you get a valid handle.
Another issue that perhaps needs to be considered when having a list of saved PID's like this is that Windows may very well reuse a PID of a process that just have been shut down for a new process...