Process in and out..
Posted: Thu Jun 24, 2004 4:15 pm
Consider this senario:
I have an app A, that injects a DLL into a certain process P. If the P is not running, I start it using CreateProcessEx. Now A and P are both running. Then P is closed by the user (I can catch this event - see "easiest way to know if a target app is closed"), and A is still running. Then P is restarted by the user. Now A should really re-inject the DLL into the new process P. But what is the easiest way to find out if P is restarted based on the exe-name?
I have an app A, that injects a DLL into a certain process P. If the P is not running, I start it using CreateProcessEx. Now A and P are both running. Then P is closed by the user (I can catch this event - see "easiest way to know if a target app is closed"), and A is still running. Then P is restarted by the user. Now A should really re-inject the DLL into the new process P. But what is the easiest way to find out if P is restarted based on the exe-name?