So you’re debugging your program, and all of a sudden you get this wierd error code – say error 0x00000011. How do you know what that message means?
Well, one way is to memorize the entire Win32 error return code set, but that’s got some issues.
Another way, if you have the right debugger extension is to use the !error extension – it will return the error text associated with the error. There’s a similar trick for dev studio (although I’m not sure what it is since I don’t use the devstudio debugger)
But sometimes you’re not running under windbg or devstudio and you’ve got a Win32 error code to look up.
And here’s where the clever trick comes in. You see, there’s a complete list of error codes built into the system. It’s buried in the NET.EXE command that’s used for network administration.
If you type “NET HELPMSG <errorno>” on the command line, you’ll get a human readable version of the error code.
C:\>net helpmsg 17
The system cannot move the file to a different disk drive.
It’s a silly little trick, but I’ve found it extraordinarily useful.