|
-
March 30th, 1999, 08:56 AM
#1
Debugging more than one process
Hi all,
I am having a problem running Visual C++ 6.0, when debugging more than one process.
From within the visual studio, I am running an application that creates another process (the parameters are found in
the attached code). My problem is that I am unable to debug the newly created process.
From what I understand the debugger is capable of debugging more than one process, but I haven't found what the problem
is.
Any one knows how to solve this problem?
Thanks,
Alon
email: [email protected]
/////////////////////////
// Create session process
STARTUPINFO StartupInfo;
StartupInfo.cb = sizeof(STARTUPINFO);
StartupInfo.lpReserved = NULL;
StartupInfo.lpDesktop = NULL;
StartupInfo.lpTitle = NULL;
StartupInfo.dwX = CW_USEDEFAULT;
StartupInfo.dwY = CW_USEDEFAULT;
StartupInfo.dwXSize = CW_USEDEFAULT;
StartupInfo.dwYSize = CW_USEDEFAULT;
StartupInfo.dwXCountChars = 0;
StartupInfo.dwYCountChars = 0;
StartupInfo.dwFillAttribute = 0;
StartupInfo.dwFlags = STARTF_FORCEOFFFEEDBACK;
StartupInfo.wShowWindow = SW_SHOWDEFAULT;
StartupInfo.cbReserved2 = 0;
StartupInfo.lpReserved2 = NULL;
StartupInfo.hStdInput = 0;
StartupInfo.hStdOutput = 0;
StartupInfo.hStdError = 0;
PROCESS_INFORMATION ProcessInfo;
BOOL fProcessCreated = CreateProcess(
"C:\\Test\\MyProc.exe", // name of executable module
NULL, // command line string - session ID
NULL, // process security attributes
NULL, // thread security attributes
FALSE, // handle inheritance flag
0, // creation flags
NULL, // pointer to new environment block
NULL, // pointer to current directory name
&StartupInfo, // pointer to STARTUPINFO
&ProcessInfo); // pointer to PROCESS_INFORMATION
-
March 30th, 1999, 10:49 AM
#2
Re: Debugging more than one process
Start a second instance of the VC environment. In that second instance, open the project
that contains the second executable. In the debug settings, set that project to be called
by the calling project.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|