If you have source code access to the exe file, check the parent process
periodically in the exe and exit if the parent process is killed. If you
don't, write a loader process to do the same. Again, this only works if you
loader is not crashed or killed.

Signature
Sheng Jiang
Microsoft MVP in VC++
> Hello,
>
[quoted text clipped - 10 lines]
>
> Thanks in advance
barbutz - 09 Jul 2007 21:50 GMT
Hi Sheng,
Thanks for the response.
Unfortunately i don't have an access to the exe source code. However i think
i'll implement a loader class as you suggested. Just one request please. Can
you please supply a code snippet that describes how to check the parent
process responsiveness? - do you refer to .net remoting or do you suggest
another way?
Thanks again!
> If you have source code access to the exe file, check the parent process
> periodically in the exe and exit if the parent process is killed. If you
[quoted text clipped - 16 lines]
> >
> > Thanks in advance
Sheng Jiang[MVP] - 09 Jul 2007 22:29 GMT
It is hard to define responsiveness for some applications. For example, you
can expect an IE window to stop responding for a while when a FTP address is
entered. Since there is no apparent main window for IE, the IE process can
be described as partially hang if another window is open and responding to
user input.
If your process has only one main window, use SendMessageTimeout to send a
WM_NULL message or check the Responding property of the Process object
returned by the Process.GetProcessById method.
You can pass your process id in the command line and parse the command line
in your loader process.
Reference
How to detect if an application has stopped responding by using Visual C#
http://support.microsoft.com/kb/304991

Signature
Sheng Jiang
Microsoft MVP in VC++
> Hi Sheng,
> Thanks for the response.
[quoted text clipped - 26 lines]
> > >
> > > Thanks in advance