October 2000
Intermediate to advanced
544 pages
11h 34m
English
Each process has an exit code that can be accessed by other processes and can be used to indicate success or failure. A process sets an exit code in the value returned from either WinMain or the "C" main function. A process could, for example, return 0 to indicate success or a non-zero value indicating an error code.
An application can call the function GetExitCodeProcess to obtain theexit code for another application. This function is passed the process kernel object handle to the other process and a pointer to a DWORD to receive the exit code:
DWORD dwExitCode; GetExitCodeProcess(hProcess, &dwExitCode);
On return, dwExitCode will contain the exit code set by the application, or the value STILL_ACTIVE if the application has ...
Read now
Unlock full access