Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The ExitProcessfunction ends a process and all of its threads.
VOID ExitProcess( UINT uExitCode );
Parameters
Return Values
None.
Remarks
ExitProcessis the preferred method of ending a process. This function provides a clean process shutdown. This includes calling the entry-point function of all attached dynamic-link libraries (DLLs) with a value indicating that the process is detaching from the DLL. If a process terminates by calling TerminateProcess, the DLLs that the process is attached to are not notified of the process termination.
After all attached DLLs have executed any process termination value, this function terminates the current process.
Terminating a process causes the following:
Terminating a process does not necessarily remove the process object from the operating system. A process object is deleted when the last handle to the process is closed.
Any process that is started as a result of a call by CreateProcessis run serially with the ExitProcess, ExitThread, and CreateThreadfunctions; that is, within the parent process, only one of these events can happen in an address space at a time. This means the following restrictions hold:
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | mkfuncs.h | Coredll.lib, |
See Also
CreateProcess, CreateThread, ExitThread, GetExitCodeProcess, GetExitCodeThread, OpenProcess, TerminateProcess