We help IT Professionals succeed at work.

Find when a specific process / window closes

DrDamnit asked
Last Modified: 2010-04-30
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!
Watch Question

Top Expert 2010
This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.