The Windows codes people actually hit, Win32, HRESULT, NTSTATUS and blue screens, with plain meanings and first moves.
Windows reports errors in four overlapping dialects, and knowing which one you are looking at is half the diagnosis. Plain small numbers (2, 5, 112) are Win32 codes, the original API errors. Long hex starting 0x8007 is usually the same Win32 code wearing an HRESULT costume (0x80070005 is error 5, access denied, in a trench coat). Codes starting 0xC0000 are NTSTATUS values from deeper in the kernel, and blue screens speak in bug-check names with their own hex values. The directory covers the recurring cast of all four, with first moves rather than false certainty.
Honest scope: Windows defines thousands of codes; this is the curated set that accounts for the overwhelming majority of searches, update failures, file and permission errors, service problems, and the blue screens with known first suspects. The detailed per-error guides in the Runtime Error Index on this site go deeper on the big ones; for any code not listed, the code's name (shown by most tools when they fail) is the search key that unlocks Microsoft's documentation.
Why does the same error appear as 5 and 0x80070005? HRESULT wraps Win32 codes: 0x8007 plus the code in the last four digits (0005). 0x80070002 is error 2. Once you see the pattern, update errors become readable.
Where do I find which code my program hit? Event Viewer's Application and System logs record codes with the failing component named, the single most useful next step for codes not in this directory.
A blue screen code is listed with several possible causes, which is it? The order given is the base-rate order: drivers, then RAM, then disk, then the exotic. The .sys filename shown on the blue screen itself outranks any generic list.