Ends a process and all its threads
CommentsExitProcess is 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 win32process::TerminateProcess, the DLLs that the process is attached to are not notified of the process termination.