|
-
July 4th, 1999, 03:13 AM
#1
How to determine Process termination??
Hi,
How can we know if the Process has terminated ( if created using CreateProcess OR WinExec() functions ).
Thanks,
-
July 4th, 1999, 03:30 AM
#2
Re: How to determine Process termination??
Hi,
if you use create CreateProcess :
You can use a structure of type PROCESS_INFORMATION
if (pi.hProcess)
{
DWORD dwExitCode = STILL_ACTIVE;
while (dwExitCode == STILL_ACTIVE)
{
WaitForSingleObject(pi.hProcess, 1000);
GetExitCodeProcess(pi.hProcess, &dwExitCode);
}
}
This while statement will wait and loop untill you process is done.
-- Ron
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
|