PDA

View Full Version : Win9x: Error 2400 (Failed to load the specified DLL)


blazm
09-23-2005, 03:08 AM
Hi,

I get an error message 2400 ("Failed to load the specified DLL.") when calling a function in a custom DLL (build with Delphi 5). I only get this error in Windows 9x (98,98SE, ME) environment, but everything works fine in Windows 2000, XP and 2003 environment. I tried both AMS 5.0.3.0 and AMS 6.0.0.0, no difference. What could be wrong? How to debug?

Thanks,

Blaz

rhosk
09-23-2005, 03:51 AM
This is just a guess, but try looking at your path to the dll. Some WIN9x setups have a hard time with spaces and long filenames. Try using 8.3 filename convention & max 11 characters (no spaces) for directory names and see if that makes a difference. The dll could be looking at a truncating path as well - on these systems.

blazm
09-23-2005, 04:38 AM
Hi,

strange, after several restarts of Windows 98 environment it started working again... There were no long files involved, dll was located in Windows\Temp folder.

Blaz

rhosk
09-23-2005, 04:46 AM
Hm weird, you could always try the ol' 'Application.GetLastError' if it ever should happen again. It will at least [may] tell you why it failed to load.