Multitasking Shell Command
Multitasking Shell Command
Ok this is a little weird, but i have a desire to create a program which will call a second program, but not interrupt the execution of the first program until the second one is complete... I know this is weird but it will be handy for it.... any ideas how to do this?
Code: Select all
#IFNDEF __FB_UNIX__
SHELL "start second_prg.exe"
#ELSE
SHELL "second_prg &"
#ENDIF
-
- Posts: 94
- Joined: Feb 07, 2011 22:48
I propose this solution :
http://msrtech.blogspot.com/2009/01/cre ... ocess.html
http://msrtech.blogspot.com/2009/01/cre ... ocess.html
Code: Select all
// Create the process
PROCESS_INFORMATION pi;
CreateProcess(..., &pi);
// Wait for it to finish
WaitForSingleObject(pi.hProcess, INFINITE);
Above statement keeps current process in suspension till CreateProcess binary is done with its task.