Although this isn’t going to help the OP, I would like to point out that
the Vista WDK finally includes winerror.exe in the tools directory. So
if you have the beta (or once it ships) you can do
C:\Documents and Settings\peter>winerror 87
87 ERROR_INVALID_PARAMETER <–> 0x40000002
STATUS_WORKING_SET_LIMIT_RANGE
87 ERROR_INVALID_PARAMETER <–> 0x80090308 No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0x80090309 No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0x8009030d No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0x80090320 No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0x80090326 No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0x80090327 No Symbolic Name
87 ERROR_INVALID_PARAMETER <–> 0xc0000003 STATUS_INVALID_INFO_CLASS
87 ERROR_INVALID_PARAMETER <–> 0xc000000b STATUS_INVALID_CID
87 ERROR_INVALID_PARAMETER <–> 0xc000000d STATUS_INVALID_PARAMETER
87 ERROR_INVALID_PARAMETER <–> 0xc000001a STATUS_UNABLE_TO_FREE_VM
87 ERROR_INVALID_PARAMETER <–> 0xc000001b
STATUS_UNABLE_TO_DELETE_SECTION
87 ERROR_INVALID_PARAMETER <–> 0xc0000030
STATUS_INVALID_PARAMETER_MIX
87 ERROR_INVALID_PARAMETER <–> 0xc0000045
STATUS_INVALID_PAGE_PROTECTION
87 ERROR_INVALID_PARAMETER <–> 0xc0000048 STATUS_PORT_ALREADY_SET
87 ERROR_INVALID_PARAMETER <–> 0xc0000049 STATUS_SECTION_NOT_IMAGE
87 ERROR_INVALID_PARAMETER <–> 0xc000004c
STATUS_BAD_WORKING_SET_LIMIT
87 ERROR_INVALID_PARAMETER <–> 0xc000004d
STATUS_INCOMPATIBLE_FILE_MAP
87 ERROR_INVALID_PARAMETER <–> 0xc000004e STATUS_SECTION_PROTECTION
87 ERROR_INVALID_PARAMETER <–> 0xc00000a9
STATUS_BAD_MASTER_BOOT_RECORD
87 ERROR_INVALID_PARAMETER <–> 0xc00000ef
STATUS_INVALID_PARAMETER_1
87 ERROR_INVALID_PARAMETER <–> 0xc00000f0
STATUS_INVALID_PARAMETER_2
87 ERROR_INVALID_PARAMETER <–> 0xc00000f1
STATUS_INVALID_PARAMETER_3
87 ERROR_INVALID_PARAMETER <–> 0xc00000f2
STATUS_INVALID_PARAMETER_4
87 ERROR_INVALID_PARAMETER <–> 0xc00000f3
STATUS_INVALID_PARAMETER_5
87 ERROR_INVALID_PARAMETER <–> 0xc00000f4
STATUS_INVALID_PARAMETER_6
87 ERROR_INVALID_PARAMETER <–> 0xc00000f5
STATUS_INVALID_PARAMETER_7
87 ERROR_INVALID_PARAMETER <–> 0xc00000f6
STATUS_INVALID_PARAMETER_8
87 ERROR_INVALID_PARAMETER <–> 0xc00000f7
STATUS_INVALID_PARAMETER_9
87 ERROR_INVALID_PARAMETER <–> 0xc00000f8
STATUS_INVALID_PARAMETER_10
87 ERROR_INVALID_PARAMETER <–> 0xc00000f9
STATUS_INVALID_PARAMETER_11
87 ERROR_INVALID_PARAMETER <–> 0xc00000fa
STATUS_INVALID_PARAMETER_12
87 ERROR_INVALID_PARAMETER <–> 0xc0000182
STATUS_DEVICE_CONFIGURATION_ERROR
87 ERROR_INVALID_PARAMETER <–> 0xc0000229 STATUS_FAIL_CHECK
(winerror 0x57 would show the same thing).
If you want to decode an NT status, you’d do:
C:\Documents and Settings\peter>winerror -s 0xc000000d
87 ERROR_INVALID_PARAMETER <–> c000000d STATUS_INVALID_PARAMETER
The error numbers are based on the Vista error mappings, so it may be a
little off for previous OS’s, but we don’t tend to change the error
mappings, just add some new ones.
Sorry - just wanted to plug it.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Arlie Davis
Sent: Thursday, April 06, 2006 8:04 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] NET ERROR MSG
“net helpmsg” is a generic way you can query the Win32 message catalog.
NET HELPMSG just uses FormatMessage with FORMAT_MESSAGE_FROM_SYSTEM. It
does not have a hard-coded list of network error codes. Therefore, it
can translate most of the error codes in <winerror.h> for you. There is
no separate namespace of “net errors” that is separate from “Win32
errors”.
You are not getting an error from “NET HELPMSG” – NET HELPMSG is
telling you that the description for error code 87 is “Invalid
parameter”.
Another way to print out error messages is the !error debugger
extensino.
And you are using a debugger, right? If you’re using Visual Studio,
there’s a debugger hint that the current value is an error code, and VS
will automatically look up and display the error text for you. Enter
the variable in the watch window as “error,hr” (assuming the variable is
named “error”). The “,hr” is a hint to the debugger that it’s an
HRESULT. Since you’re dealing with Win32 error codes, which are not
HRESULTs, you’ll have to convert them to HRESULTs first, by using the
HRESULT_FROM_WIN32 macro, like so:
foo()
{
HRESULT result;
HANDLE handle;
handle = CreateFile(…);
if (handle == INVALID_HANDLE_RESULT) {
result = HRESULT_FROM_WIN32(GetLastError());
// set breakpoint here
}
}
When the breakpoint fires, examine the ‘result’ variable. You shouldn’t
need to add the “,hr” suffix, but if VS doesn’t automatically display
it, use the suffix and add it to the watch window. The
HRESULT_FROM_WIN32 macro just encodes a Win32 error code (which is a
small positive integer) as an HRESULT (which has an “error” bit, a
“facility code” which is set to FACILITY_WIN32, and the Win32 error code
in the bottom 16 bits).
FormatMessage will handle both Win32 error codes and HRESULTs.
– arlie
________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar
Sent: Thursday, April 06, 2006 10:42 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] NET ERROR MSG
Thanks Tim.
I tried it & it gave the message box
“CreateFile failed Errorcode 87”.
I am trying to find out error code 87 with NET HELPMSG 87, but got the
error, parameter not correct.
I referred to the following page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdk4
0/ht
ml/cerefneterrors-numericalorder.asp
It specifies the error code values as 4 digits. There are system error
codes, from which 87 = Parameter is incorrect, ERROR_INVALID_PARAMETER.
But it is not a NET ERROR.
Please advise.
Thanks,
Harsha
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</winerror.h>