CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Posts
    1

    Notification of a spawned process that has been terminated

    I am currently spawning a new process from an existing process with CreateProcess. After the process has been spawned, I wish to continue work in the process that spawned the new process, and be notified when the new process has been terminated so I can invoke a "callback" method. Would I post a windows message from the terminated process in order to do this?

    Thanks in advance for any information.


  2. #2
    Join Date
    Jul 1999
    Location
    Brazil
    Posts
    48

    Re: Notification of a spawned process that has been terminated

    Hi,

    You can do it by creating a new worker thread for launch the new process, and then wait for it to end using WaitForSingleObject().

    Doing this you will make the main thread of your main process to continue execution, while the new thread wait for the launched process to end.

    HIH


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured