Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was kind of surprised when I saw this that the guy knew the break down of the hex error codes. Maybe I am showing my inexperience, but does someone know a MSDN or Technet document that breaks down the entire formation of hex error codes in Windows? I would be interested to read it.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

There are Windows system specific error codes which are documented here, but other API's and technologies will have their own lists of result codes.

The one in your example is an ADSI error code.
ADSI Error Codes (on MSDN)

That error code specifically is a Win32 related error thrown by ADSI.
Win32 Error Codes for ADSI 2.0 (also on MSDN)

Basically, you search for a specific code if you run across one or look for the API references for the technologies that you are working with and go to MSDN to get their error code reference.

EDIT:
For the breakdown of the error code format it's basically the same thing. Each API can have its own error code format and some, as in your example, will also include system error codes from Windows and / or other API's. The Win32 ADSI error codes in your example will return the specific Win32 error code within the ADSI error code. The breakdown is explained in the Win32 Error Codes for ADSI page.

In the case of the example, the fact that the ADSI code starts with 0x8007 means it's a Windows System (Win32) error. The last 4 digits of the ADSI hex error code translate into the specific dword value of the Win32 error code.

share|improve this answer
    
Thanks for the docs, but I am specifically looking for break down of the code. Why is it 0x800, the 7 (as he referenced in the link, 7 stands for Windows 7 as facility, IIRC), and the rest is segmented into API specific error codes. You answer helps me partially. What I want is to know which OS, the common APIs, so then I can find the document kike those you linked to knowing that is the definitive starting point. Does that make sense? –  ajstein Feb 22 '11 at 15:11
    
@alharaka Ah, sorry. See my edit for further explanation. –  squillman Feb 22 '11 at 15:22
    
So the answer is: too inconsistent to matter, right? I mean, beyond there is no subsystem breakdown in a document, right? I guess I get what I asked for from Microsoft, which was originally nothing! Haha. –  ajstein Feb 22 '11 at 23:38
    
@alharaka Yep, something like that. Keep in mind, though, that not all error codes will necessarily have a format such as you're looking for. –  squillman Feb 22 '11 at 23:40
    
I was hoping to hear the opposite. However, you have been clear all the way through. I will award you the check since I think this whole answer thread paints the picture. –  ajstein Feb 22 '11 at 23:48
add comment

Here's a list of system return codes on MSDN. It's rather extensive (15999 codes!), so get your coffee ready. ;-)

Additionally, you can convert the number to decimal, and then call the net command to get the same result:

> net helpmsg 0
The operation completed successfully.

> net helpmsg 1
Incorrect function.
share|improve this answer
    
Note that currently the codes only go up to 15301, and the numbering is discrete. –  Chris S Feb 22 '11 at 15:08
    
I use net helpmsg extensively. I am curious about the breakdown of a hex code, which this will not help me with most of the time. Thanks anyway. –  ajstein Feb 22 '11 at 15:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.