Is there a WIN32 function that returns the full error description?

Started by
5 comments, last by Kimeli 18 years, 7 months ago
... if i pass it the value returned by GetLastError()? This would be useful otherwise i will have to do it manually. ace
Advertisement
Yeah.... the FormatError function.
Hey Sneftel, are you sure its called that, i couldn't see it on msdn.

thanks

ace
Er, duh. FormatMessage. Sorry 'bout that.
I use it in my error function :)

char ErrorTranslation[MAX_PATH];FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError(), 0, ErrorTranslation, MAX_PATH, 0);
I use this MSDN linky
[ILTUOMONDOFUTURO]
Hint:
I have used following "code" in watch -window for debugging:
@err, hr

This one displays current error description and works at least in VC6.

This topic is closed to new replies.

Advertisement