Windows / NTSTATUS
NTSTATUS
NTSTATUS error codes are typically used for low-level operations such as machine check exceptions, debugger API, and the SysWOW64 32-bit application layer, communicated from the WindowsNT kernel.
These codes are defined in Ntdef.h and have the following structure.
1 | 3 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 2 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 1 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sev | C | N | Facility | Code |
Legend
- Sev (2 bits): Severity. Severity values are listed further below.
- C (1 bit): Customer. Microsoft codes have this bit cleared.
- N (1 bit): Reserved. Must be cleared so it can correspond to a HRESULT.
- Facility (12 bits): Source facility.
- Code (16 bits): Error code.
Severities
Value | Name | Description |
---|---|---|
0x0 | STATUS_SEVERITY_SUCCESS | Success. |
0x1 | STATUS_SEVERITY_INFORMATIONAL | Informational. |
0x2 | STATUS_SEVERITY_WARNING | Warning. |
0x3 | STATUS_SEVERITY_ERROR | Error. |
Facilities
The table below lists facilities defined in the MS-ERREF specification.
Name | Value | Description |
---|---|---|
FACILITY_DEBUGGER | 1 | Windows Debugger |
FACILITY_RPC_RUNTIME | 2 | Windows Remote Procedure Call Runtime |
FACILITY_RPC_STUBS | 3 | Windows Remote Procedure Call Stub |
FACILITY_IO_ERROR_CODE | 4 | Input/Output |
FACILITY_NTWIN32 | 7 | WindowsNT Win32 |
FACILITY_NTSSPI | 9 | Security Support Provider Interface (SSPI) |
FACILITY_TERMINAL_SERVER | 10 | Windows Terminal Server |
FACILTIY_MUI_ERROR_CODE | 11 | Multilingual User Interface |
FACILITY_USB_ERROR_CODE | 16 | Universal Serial Bus |
FACILITY_HID_ERROR_CODE | 17 | Humand Interface Device |
FACILITY_FIREWIRE_ERROR_CODE | 18 | IEEE 1394 FireWire |
FACILITY_CLUSTER_ERROR_CODE | 19 | |
FACILITY_ACPI_ERROR_CODE | 20 | Advanced Configuration and Power Interface |
FACILITY_SXS_ERROR_CODE | 21 | Windows Side-by-Side |
FACILITY_TRANSACTION | 25 | Windows Kernel Transaction Manager (KTM) |
FACILITY_COMMONLOG | 26 | Windows Common Log File System (CLFS) |
FACILITY_VIDEO | 27 | Windows Media Foundation |
FACILITY_FILTER_MANAGER | 28 | Windows Filter Manager (FltMgr.sys) |
FACILITY_MONITOR | 29 | Windows Monitor File |
FACILITY_GRAPHICS_KERNEL | 30 | Windows DirectX Graphics Kernel |
FACILITY_DRIVER_FRAMEWORK | 32 | Windows Driver Framework (WDF) |
FACILITY_FVE_ERROR_CODE | 33 | Windows Full Volume Encryption |
FACILITY_FWP_ERROR_CODE | 34 | Windows Filtering Platform (WFP) |
FACILITY_NDIS_ERROR_CODE | 35 | Windows Network Driver Interface Specification |
FACILITY_HYPERVISOR | 53 | Windows Hyper-V |
FACILITY_IPSEC | 54 | Windows IPSec |