CString LooksySerroString (DWORD DWERROR) {CSTRING SRET (_Text (""));
HLOCAL hlocal = NULL; // Buffer that gets the error message string // Get the error code's textual description BOOL fOk = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, dwError, MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US), (PTSTR) & hlocal, 0, NULL ); if (! fOk) {// Is it a network-related error HMODULE hDll = LoadLibraryEx (TEXT ( "netmsg.dll"?), NULL, DONT_RESOLVE_DLL_REFERENCES); if (hDll = NULL) {FormatMessage (FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM! , HDLL, DWERROR, MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US), (PTSTR) & Hlocal, 0, NULL; FreeElibrary (HDLL);}}
IF (Hlocal! = NULL) {SRET = (LPCTSTSTSTSTSTSTSTO); LocalFree (Hlocal);} else {sret = _text ("ERROR NUMBER NOT FOUND.");}
Return SRET;
}