Is there a particular windows event to check when a program has exited like "onTermination" or something...? Any help would be greatly appreciated.
Printable View
Is there a particular windows event to check when a program has exited like "onTermination" or something...? Any help would be greatly appreciated.
you want to react to the exit of a specific program?
get the process handle and loop asking for its exitcode.
i once wrote this code:
don't forget to break out the loop... :-)Code:while( TRUE )
{
GetExitCodeProcess( hProcess, &dwExitCode );
if( dwExitCode != STILL_ACTIVE )
{
...
}
Sleep( ... );
}
i hope that answered your question...
WM_CLOSE may be of some interest.