I have written a window program in MS VC++ 6.0 (under Windows 2000) that need to launch an exe that is running under VDM and WOW subsystem.
I want to launch multiple instance of that application. I do this by calling CreateProcess(NULL, (LPTSTR)<my exe name with full path>, NULL, NULL, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi) method for each instance. The problem is that the first time I create the process for that app I get the process id of VDM (I verified the process ID by using Spy++, and looking in the Task Manager), but subsequent launch doesn't not return any process Id. My target is to obtain the process id for each instances of that exe. I looked at the Task Manger and found the behavior of exe as follows:
1) If I manually launch the first instance of the exe then I get this information:
Image Name PID Handles Threads
NTVDM.EXE 2160 109 4
hiddnapp.exe
wiwexec.exe
wqsptcp.exe
and when second instance is launched then following information is displayed in Task Manager:
Image Name PID Handles Threads
NTVDM.EXE 2160 109 4
hiddnapp.exe
wiwexec.exe
wqsptcp.exe
wqsptcp.exe
and when I shut down the application then following information is still remain in Task Manager:
Image Name PID Handles Threads
NTVDM.EXE 2064 107 3
wiwexec.exe
Since I don't have the process ID for each launched application, I'm stuck. Could someone please tell me how I can get over this hurdle.
Thanks
GT
Note: the hiddnapp.exe remains as long as atleast one instance is running.
__________________
I want to launch multiple instance of that application. I do this by calling CreateProcess(NULL, (LPTSTR)<my exe name with full path>, NULL, NULL, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi) method for each instance. The problem is that the first time I create the process for that app I get the process id of VDM (I verified the process ID by using Spy++, and looking in the Task Manager), but subsequent launch doesn't not return any process Id. My target is to obtain the process id for each instances of that exe. I looked at the Task Manger and found the behavior of exe as follows:
1) If I manually launch the first instance of the exe then I get this information:
Image Name PID Handles Threads
NTVDM.EXE 2160 109 4
hiddnapp.exe
wiwexec.exe
wqsptcp.exe
and when second instance is launched then following information is displayed in Task Manager:
Image Name PID Handles Threads
NTVDM.EXE 2160 109 4
hiddnapp.exe
wiwexec.exe
wqsptcp.exe
wqsptcp.exe
and when I shut down the application then following information is still remain in Task Manager:
Image Name PID Handles Threads
NTVDM.EXE 2064 107 3
wiwexec.exe
Since I don't have the process ID for each launched application, I'm stuck. Could someone please tell me how I can get over this hurdle.
Thanks
GT
Note: the hiddnapp.exe remains as long as atleast one instance is running.
__________________