Home » Windows»Windows Error Codes

Often, you will see mention of things like System Error 52 or Operating System error 2 has occurred. But what do they mean?


Most of what you'll see is defined in the header file winerror.h. You can get a copy of this from MSDN here. This file will tell you that error 61 is actually...

// MessageText:
// The printer queue is full.

...because your printer queue is full.

A Quicker Way

Of course, nobody wants to go looking through header files to find out what an error code means. Fortunately, you don't have to. The net.exe command contains an often ignored function called net helpmsg. Running net helpmsg 61 will tell you The printer queue is full.

Often, this net helpmsg function is ignored, as you'll only see it mentioned when you already know what the problem is:

C:\>net start spooler
The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

Chocolate Teapot?

Typing net helpmsg 2182 will merely confirm what you already knew - You tried to start a service that is already running, which ranks somewhere between 'chocolate teapot' and 'inflatable dart-board' in usefulness, you might be thinking.
But it's still useful in some cases. Take for example the following eventlog entry:

Event Type: Error
Event Source: SNMP
Event Category: None
Event ID: 1501
Date: 15/08/2008
Time: 16:35:37
User: N/A
Computer: BRIGHTON-SQL04
The SNMP Service encountered an error while setting up the incoming transports.\n The IP transport has been dropped out.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
0000: 47 27 00 00 G'..

That last Data part will map to a Win32 error code. It's represented in Bytes by default, but in the eventvwr snap-in, you can choose to show it as Words - which gives you 00002747. Which probably should read 0x00002747 because it's Hex. Now convert that to decimal, and you get 10055. Finally, lookup Win32 error 10055 (using net helpmsg or a copy of Winerror.h) and you get An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full - which gives you a better idea of what might be going wrong.

Other Errors

Just because we have a nice neat list of Win32 errors does not mean that every obscure number is a Win32 error code. For example - you're probably familiar with seeing a 404 Not Found error. This is not a Win32 error. It's an HTTP error code, as documented in RFC2616. These codes are specific to the protocol, and will be used by other operating systems that have never heard of the Win32 API.
A better place for lookup up Windows error numbers is at this document on MSDN: System Error Codes(Windows). This document includes errors defined in other headers, outside of Winerror.h.