This didn't help me at all, I want to display the error as a string, not a #. Thanks though.
The supplied code will display the error message associated with the supplied error number.
Code:
bRet = ReadFile(...);
if (!bRet) {
DisplayError("Some Context.", GetLastError() );
}
Sample output:
Some Context.
Windows Error 38: Reached the end of the file.
Alternatively you can write a thousand plus switch case with the error messages and numbers found here:
http://msdn.microsoft.com/library/en...rror_codes.asp
Please consider actually trying the code.
Have Fun!