Thread: Detecting program close

  1. #1
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355

    Detecting program close

    Hi all,

    In a program I am currently making, I need to launch two different applications, one after the other.

    It is imperitive that I wait for the first application to finish before I launch the second.

    The problem is I can't figure out how to do this. What I thought would be possible would be to use the returned handle from the first ShellExecute, and enter a loop until it was no longer a valid handle, indicating program termination.

    Does anyone know how I can do this?

    I looked around the API for some functions but couldn't find any.

    Thanks heaps for any help you provide.
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Read this thread

    gg

  3. #3
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Thanks codeplug

    I did search around.
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 07:51 AM
  2. my server program auto shut down
    By hanhao in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-13-2004, 10:49 PM
  3. Detecting if a program is open
    By nate11000 in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2003, 08:22 PM
  4. Program doesn't close.
    By kdc6794 in forum Windows Programming
    Replies: 3
    Last Post: 12-10-2002, 02:07 AM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM