2015-09-29
A Case Study in How NOT To Process Orders
Home » Windows»Windows Error Codes
2015-09-29
A Case Study in How NOT To Process Orders
2014-02-08
Reading email SMTP headers to trace the origin of the message.
2014-02-07
Rants about the pains of performing what should be a simple package upgrade.
Your IP address is
3.238.253.163
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...
//
// MessageId: ERROR_PRINTQ_FULL
//
// MessageText:
//
// The printer queue is full.
//
#define ERROR_PRINTQ_FULL 61L
...because your printer queue is full.
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.
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
Description:
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.
Data:
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.
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.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
Design by GetTemplate