Windows Error Codes

Look up Win32, HRESULT and NTSTATUS codes with meanings and fix hints.

Search a reference of common Windows error codes across Win32, HRESULT/COM and NTSTATUS layers — decode a number in decimal or hex and get the symbolic name, meaning and a practical fix hint.

What is the difference between Win32, HRESULT and NTSTATUS codes?

Win32 error codes are small positive integers returned by GetLastError, such as 5 for access denied. HRESULT codes are 32-bit values used by COM and modern APIs, typically shown in hex like 0x80070005, where the low 16 bits often wrap a Win32 code. NTSTATUS values come from the kernel and driver layer, usually starting 0xC0000000 for errors.

Decode a Windows error code in seconds

Windows surfaces failures as numbers — a Win32 error like 5, an HRESULT like 0x80070005, or an NTSTATUS like 0xC0000022. They look cryptic but each maps to a symbolic name and a concrete meaning. This tool takes a decimal or hexadecimal value (or a name) and tells you the layer it came from, what it means, and the first thing to check.

How it works

The page carries a curated list of common error codes, each tagged with its layer (Win32, HRESULT, or NTSTATUS), its symbolic name, meaning, and a fix hint. Your input is normalised: a leading 0x marks a hexadecimal value, which is parsed and matched against entries stored as hex; a bare integer is matched as a Win32 decimal code. HRESULTs that carry a Win32 facility (the 0x8007xxxx form) are cross-referenced so that 0x80070005 and 5 both resolve to access-denied. Text queries match the symbolic name and meaning.

Tips and notes

When you only have a Win32 number, net helpmsg 5 prints the text on any Windows machine. For HRESULTs, remember the 0x8007 prefix means a wrapped Win32 code — strip it to the low word and you often get a familiar error. NTSTATUS values (usually 0xC0000000+) come from drivers and the kernel; they are translated to Win32 errors by RtlNtStatusToDosError before most apps see them. Always capture the error immediately after the failing call, because a later API call will overwrite the thread’s last-error value. This list covers the common cases; the full Microsoft system-error documentation is authoritative for the rest.