Debugging Spawned Applications in Visual C++ |
Q118683
This article describes how to debug an application that is spawned (executed) from another application within the Visual Workbench for Windows.
The sample code below contains the source for files PROG_A.EXE and
PROG_B.EXE. To debug PROG_B.EXE, which is spawned from PROG_A.EXE, perform
the following steps:
/* Compile options needed: Default QuickWin settings.
*/
// PROG_A.CPP
#include <iostream.h>
#include <windows.h>
void main( void )
{
cout << "Starting Prog_a.exe" << endl;
i = WinExec("prog_b.exe", SW_SHOW);
}
// PROG_B.CPP
#include <iostream.h>
void main()
{
cout << "Greetings from Prog_b." << endl;
}
Additional query words: kbinf 1.00 1.50 CreateProcess
Keywords : kb16bitonly
Issue type :
Technology :
|
Last Reviewed: May 8, 2001 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |