Exit Codes Windows |verified| -

These are STILL_ACTIVE (thread) and STATUS_PENDING (process). Seeing them from GetExitCodeProcess means you called it before the process actually exited. This is a classic race.

Crucially, the exit code is the return value of main() in the C runtime sense. The CRT wraps main() , captures its return value, and passes it to ExitProcess() . If you never call ExitProcess explicitly, the CRT does it for you. exit codes windows

If yes, it's either an NTSTATUS (0xCxxxxxxx) or HRESULT (0x8xxxxxxx). Use the Visual Studio tool err.exe or net helpmsg : These are STILL_ACTIVE (thread) and STATUS_PENDING (process)

> err 0xC0000005 # for hex 0xc0000005 / decimal -1073741819 STATUS_ACCESS_VIOLATION Check against Win32 error codes: Crucially, the exit code is the return value

If your main() throws an uncaught C++ exception, the CRT catches it, calls terminate() , and then ExitProcess(3) . The code 3 means nothing about your logic—it simply signals "CRT abnormal termination."

This overlap is a trap: an exit code of 2 could mean "invalid parameter" (application-defined), or it could mean ERROR_FILE_NOT_FOUND from a failed CreateFile . Without the program's documentation, you cannot disambiguate. Three common scenarios produce exit codes that are technically correct but semantically useless:

exit codes windows

Please hold your phone upright

Filters
Results

    These are STILL_ACTIVE (thread) and STATUS_PENDING (process). Seeing them from GetExitCodeProcess means you called it before the process actually exited. This is a classic race.

    Crucially, the exit code is the return value of main() in the C runtime sense. The CRT wraps main() , captures its return value, and passes it to ExitProcess() . If you never call ExitProcess explicitly, the CRT does it for you.

    If yes, it's either an NTSTATUS (0xCxxxxxxx) or HRESULT (0x8xxxxxxx). Use the Visual Studio tool err.exe or net helpmsg :

    > err 0xC0000005 # for hex 0xc0000005 / decimal -1073741819 STATUS_ACCESS_VIOLATION Check against Win32 error codes:

    If your main() throws an uncaught C++ exception, the CRT catches it, calls terminate() , and then ExitProcess(3) . The code 3 means nothing about your logic—it simply signals "CRT abnormal termination."

    This overlap is a trap: an exit code of 2 could mean "invalid parameter" (application-defined), or it could mean ERROR_FILE_NOT_FOUND from a failed CreateFile . Without the program's documentation, you cannot disambiguate. Three common scenarios produce exit codes that are technically correct but semantically useless:

    You have disabled javascript in your browser. Our web site can not work properly without it.Enable it, please.