This didn't help me at all, I want to display the error as a string, not a #. Thanks though.Quote:
Originally posted by anonytmouse
Code:#include <windows.h>
#include <stdio.h>
void DisplayError( LPSTR msg, DWORD err )
{
char msgbuf[4096];
sprintf(msgbuf,"%s\nWindows Error %d: ",msg, err );
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT),
msgbuf + lstrlen(msgbuf), sizeof( msgbuf ) - lstrlen(msgbuf), NULL );
MessageBox(NULL,msgbuf,"Error",MB_ICONERROR);
}
Hunter, I'll see what I can do with it.