Click to See Complete Forum and Search --> : DLL fails to load, only in 95 (not NT or 98)


James Hughes
August 20th, 1999, 07:03 AM
I have a MFC DLL that fails to load in a LoadLibraryEx call, but only on Windows 95 - it works fine on 98 and NT/2000.

It doesnt even get to the DllMain function - the load call returns straight away with a DLL failed to initialize error.

Does anyone know how I can debug this to see what is causing the problem.

I dont think its any of the reasons given in the Platform SDK for 95 failure (resource values > 0x7fff, Unicode calls etc), but am really clutching at straws now....



James

August 20th, 1999, 08:13 AM
What does GetLastError() return? And are you calling LoadLibraryExA or LoadLibraryExW?

James Hughes
August 20th, 1999, 08:50 AM
Using LoadLibraryExA (UNICODE *not* defined, _MBCS *is* defined)

Error message using GeLastError and FormatString is

"A dynamic link library (DLL) initialization routine failed."

ERROR_DLL_INIT_FAILED (1114)

James