In my program I have a two step authentication process. The first step opens up a secure shell client that connects to the server, and the second step authenticates the user with the server.
I need to know if / when teh first program (plink in this case) closes so that I can notify the user they need to reconnect. Plink is launched with ShellExecute so I have the hInstance available, but I don't know how to get from knowing the hInstance of the spawned application to "Hey user! You need to re open the secure shell!"
I think this might help: http://support.microsoft.com/kb/242308
I would really like to put a hook in there if that is appropriate (unless someone has a better, simplier way...)
Thanks in advance!