Documentation on Windows Hex Error Codes
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.
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.
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.