Terminates the current process (and thereby all threads in it) and specifies the exit code. Any threads waiting for the process wake up.
VOID ExitProcess( UINT uExitCode ); VOID RtExitProcess( UINT uExitCode );
uExitCode
To retrieve the process's exit value, use GetExitCodeProcess. To retrieve a thread's exit value, use GetExitCodeThread.
This function is the preferred method of ending a process because it provides a clean process shutdown. This includes calling the entry-point function of all attached RSLs with a value indicating that the process is detaching from the RSL.
After all attached RSLs execute any process termination code, this function terminates the current process.
Terminating a process causes these actions:
Terminating a process does not necessarily remove the process object from the OS. A process object is deleted when the last handle to the process closes.
None.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/iwin32.h intime/rt/include/winbase.h |
iwin32.h windows.h |
iwin32.lib |
Notes
CreateThread, ExitThread, GetExitCodeProcess, GetExitCodeThread, OpenProcess, RtCreateProcess, TerminateProcess, iwin32 API, iwin32 Overview