I've spun this off from David Pennington's thread so that it can be more easily found.
There is a tool that can be very helpful in diagnosing load problems. It's located at http://www.dependencywalker.com/.
The following Smalltalk Do It can be helpful, as well. (There are Windows settings that would open a dialogue if there is a problem loading the DLL or its dependencies. The script doesn't mess with those settings, but could. See Microsoft's SetErrorMode function.)
|module fileName |
fileName :=GbsConfiguration current libraryName."fileName can be fully qualified" "get DLL handle to see if it is already loaded" (module:=OSHmodule getModuleHandle: fileName) isNull ifTrue: ["load the DLL" module:=OSHmodule loadLibrary: fileName]. module isNull ifTrue:[self error:'could not load the dll'] ifFalse:["free the DLL" module freeLibrary ifTrue:['success'] ifFalse:[self error:'could not unload the dll']]