diff --git a/MemoryModule.c b/MemoryModule.c index 0c5d209..96a0fcb 100644 --- a/MemoryModule.c +++ b/MemoryModule.c @@ -141,13 +141,12 @@ OutputLastError(const char *msg) #ifndef DEBUG_OUTPUT UNREFERENCED_PARAMETER(msg); #else - LPVOID tmp; - char *tmpmsg; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&tmp, 0, NULL); + char *tmp, *tmpmsg; + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&tmp, 0, NULL); tmpmsg = (char *)LocalAlloc(LPTR, strlen(msg) + strlen(tmp) + 3); sprintf(tmpmsg, "%s: %s", msg, tmp); - OutputDebugString(tmpmsg); + OutputDebugStringA(tmpmsg); LocalFree(tmpmsg); LocalFree(tmp); #endif