running other dos apps from a console app 
Author Message
 running other dos apps from a console app

I'm writing a console app to replace a batch file.   The batch file calls
some console apps.  I'd like the new console app to call these console apps
as well and I'm wondering if I can make a call such that the main console
app will wait until the called console app returns (finishes).   Or,
alternatively, if flow of control returns immediately after I fire off the
progeny console app, is there a way I can 'watch' the child app from the
parent app and know when the child has terminated and how.

Thanks,

Dennis




Sun, 15 Oct 2000 03:00:00 GMT  
 running other dos apps from a console app

Dennis,

Run the other console app with a call to CreateProcess. Synchronize with the
"child" app by calling WaitForSingleObject against the process handle
returned in the PROCESS_INFORMATION structure which is an argument to
CreateProcess.

Dave Smith

Quote:

>I'm writing a console app to replace a batch file.   The batch file calls
>some console apps.  I'd like the new console app to call these console apps
>as well and I'm wondering if I can make a call such that the main console
>app will wait until the called console app returns (finishes).   Or,
>alternatively, if flow of control returns immediately after I fire off the
>progeny console app, is there a way I can 'watch' the child app from the
>parent app and know when the child has terminated and how.

>Thanks,

>Dennis





Mon, 16 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. running win32 apps and dos apps from a menu app

2. MFC and DOS apps - Redirecting console output to an MFC app (Newbie)

3. MFC and DOS apps - Redirecting console output to an MFC app (Newbie)

4. Run console app from within my gui app

5. Running a console app from a windows app

6. Running console app from within a win32 app

7. How to run a Console app from Graphic app and pick up the output

8. How to run a Console app from Graphic app and pick up the output

9. Running console app from within a win32 app

10. Cannot run app with Mfc42.dll (and others) in working directory

11. Compiling a console app for dos mode?

12. Settings for DOS window open by console app ?

 

 
Powered by phpBB® Forum Software