Posted on 1997-04-22
I am having some difficulty with the LoadLibrary function in the Windows
API. When I try and load a dll (which I made) GetLastError returns 126 but the function DOES NOT return NULL.
The documentation identifies this error as RROR_MOD_NOT_FOUND. I was
certain I was specifying the correct name. So I considered maybe my DLL
was improper in some way. So I tried to load another dll (one that I
randomly selected from the windows directory) and GetLastError return 31
OR_GEN_FAILURE. If I attempt to link the import library for my DLL to
the exectuble then everything works great. So I am pretty certain my
DLL works fine. For my purposes I need to dynamically load my DLL
however and I havn't been able to get LoadLibrary to work on my DLL or
any other. Does anybody have any ideas?