Common Process Termination Values

When your application does something the OS (or the application itself) doesn't like, often the floor gets yanked out and the process is terminated in an abrupt manner. If you don't happen to be running with a debugger, often the easiest way to get an idea of what went wrong is to look at the process exit code. Here we have an assortment of some of the more frequently encountered exit codes you are likely to witness:


CRT's abort() or assert() was called.


An unhandled breakpoint (such as __debugbreak()), may also be caused by /RTC run-time checks.


Access violation.


Stack overflow. Avoid recursion, move large stack buffers onto the heap, or increase the stack size via the /STACK linker option.


A required DLL was not found. Make sure you deploy all necessary components.


An API is missing from the loaded DLL (searched by ordinal). This, and the one below, is typically due to running on an older version of Windows. You can change your _WIN32_WINNT, _WIN32_IE, etc. defines to target a previous version, or use LoadLibrary/GetProcAddress on the specific new API.


An API is missing from the loaded DLL (searched by name).


DllMain (from a required library) returned FALSE.


Heap corruption detected (via HeapSetInformation's HeapEnableTerminationOnCorruption option).


Stack corruption detected (typically a result of /GS stack checks).


Invalid CRT parameter (typically a result of the safe CRT functions failing a check).

The 0xC… values are NTSTATUS codes, so if you happen to see other values in that range you know where to look them up.