During debug, toss up a OOM dialog during a failed loadlibrary. NPODB

This commit is contained in:
dougt%meer.net 2005-08-04 16:48:59 +00:00
parent 5ad7dc9eb1
commit 57ba466334

View File

@ -1325,14 +1325,20 @@ MOZCE_SHUNT_API HINSTANCE mozce_LoadLibraryA(LPCSTR lpLibFileName)
if(wPath) {
retval = LoadLibraryW(wPath);
free(wPath);
}
#ifdef DEBUG
if (!retval) {
mozce_printf("LoadLibraryA failure! %d\n", GetLastError());
DWORD error = GetLastError();
mozce_printf("LoadLibraryA failure (14==OOM)! %d\n", error);
if (error == 14)
MessageBoxW(NULL, L"Failed to Load Library. Out Of Memory.", wPath, 0);
}
#endif
if (wPath)
free(wPath);
return retval;
}