Thread: specific windows event

  1. #1
    Registered User
    Join Date
    Apr 2004

    specific windows event

    Is there a particular windows event to check when a program has exited like "onTermination" or something...? Any help would be greatly appreciated.

  2. #2
    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:

    while( TRUE )
    	GetExitCodeProcess( hProcess, &dwExitCode );
    	if( dwExitCode != STILL_ACTIVE )
    	Sleep( ... );
    don't forget to break out the loop... :-)
    i hope that answered your question...

  3. #3
    Join Date
    Jan 2002
    WM_CLOSE may be of some interest.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  2. Network Programming in C for Windows
    By m.mixon in forum C Programming
    Replies: 7
    Last Post: 06-19-2006, 08:27 PM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM