Platform:Windows/NTSTATUS
Appearance
Topic page of Platform:Windows.
The 32-bit NTSTATUS code: severity in the top two bits, customer flag, facility and code, plus the values that appear most in crashes, loader failures and Nt* syscall return paths.
Structure
- Bits 31-30: severity (0 success, 1 informational, 2 warning, 3 error). Bit 29: customer-defined. Bit 28: reserved. Bits 27-16: facility. Bits 15-0: code.
NT_SUCCESS(s)is(LONG)s >= 0(severity success or informational). So 0x00000103 STATUS_PENDING and 0x40000000-range values count as success; 0x8xxxxxxx warnings (STATUS_BUFFER_OVERFLOW 0x80000005) do not, though data may be returned.- Exception codes are NTSTATUS values: the debugger and SEH report
0xC0000005etc. Win32 error codes differ (ERROR_ACCESS_DENIEDis 5);RtlNtStatusToDosErrormaps. The0xC...prefix versus a small number tells which family a constant belongs to. - Win32 HRESULTs wrapping an NTSTATUS have bit 28 set:
0xD0000005=0xC0000005 | 0x10000000(FACILITY_NT_BIT).
Common values
See the enum fact on this page for the table (STATUS_SUCCESS, PENDING, ACCESS_VIOLATION, INVALID_HANDLE, INVALID_PARAMETER, ACCESS_DENIED, DLL_NOT_FOUND, ENTRYPOINT_NOT_FOUND, STACK_BUFFER_OVERRUN, HEAP_CORRUPTION...). Process exit codes of crashed programs are the exception status, which is why a process that died with -1073741819 (0xC0000005) crashed on an access violation, 0xC0000135 could not find a DLL, and 0xC000007B mixed 32- and 64-bit images.
Related
Code & repositories
- https://github.com/mingw-w64/mingw-w64 @
63ebe6cdb3ec4d5c586b7f0f0c03dd502e44c296· license: ZPL-2.1 AND LicenseRef-PD (declared by the contributor for the files used; GitHub reports BSD-2-Clause (read from COPYING; GitHub's detector did not classify it) for the repository)
mingw-w64 headers (public domain / ZPL / MIT mix): ntstatus.h with every STATUS_* value.
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2026-10-12
Evidence & references
mingw-w64 ntstatus.h (public domain, values from MS-ERREF).