Prabal
April 1st, 1999, 12:19 PM
Windows NT4.0,SP3
Dear All,
I have created a number of child processes using
CreateProcess().Subsequently I am calling WaitForMultipleObjects() to
wait for all the child processes to terminate.When
all the child processes have terminated I want to know the termination
status of all the processes.GetExitCodeProcess() function retrieves the
termination status of the specified process.From the documentation of
the GetExitCodeProcess() it is not clear how I can get more detailed
information about the termination status of the process.At least I want
to get the information whether the process terminated normally or
abnormally;if terminally abnormally I want to increment an error count
and I want to get more information about the abnormal condition which
caused the process to terminate.This the code I am using right now:
for(a_iCount=0;a_iCount<a_iProcessNo;a_iCount++)
{
if (GetExitCodeProcess(pInfo[a_iCount].hProcess, &exitCode))
{
switch(exitCode)
{
case STILL_ACTIVE: printf("Process is still active\n");
break;
default: printf("Exit code = %d\n", exitCode);
break;
}
}
else
{
printf("GetExitCodeProcess() failed\n");
}
}
Can somebody tell me how to get more detailed termination status of a
process if possible with some sample code.
Thanking in anticipation,
Prabal
Dear All,
I have created a number of child processes using
CreateProcess().Subsequently I am calling WaitForMultipleObjects() to
wait for all the child processes to terminate.When
all the child processes have terminated I want to know the termination
status of all the processes.GetExitCodeProcess() function retrieves the
termination status of the specified process.From the documentation of
the GetExitCodeProcess() it is not clear how I can get more detailed
information about the termination status of the process.At least I want
to get the information whether the process terminated normally or
abnormally;if terminally abnormally I want to increment an error count
and I want to get more information about the abnormal condition which
caused the process to terminate.This the code I am using right now:
for(a_iCount=0;a_iCount<a_iProcessNo;a_iCount++)
{
if (GetExitCodeProcess(pInfo[a_iCount].hProcess, &exitCode))
{
switch(exitCode)
{
case STILL_ACTIVE: printf("Process is still active\n");
break;
default: printf("Exit code = %d\n", exitCode);
break;
}
}
else
{
printf("GetExitCodeProcess() failed\n");
}
}
Can somebody tell me how to get more detailed termination status of a
process if possible with some sample code.
Thanking in anticipation,
Prabal