LoadLibrarA/LoanLibraryW dll instantly unloaded



I have used both functions to load a .dll but while my path and filename seem correct, I get the following messages in the output window:

Loaded 'C:\customlibs\plugins\glCalculations.dll'
Unloaded 'C:\customlibs\plugins\glCalculations.dll'

The two messages appear immediately after executing any of the two winbase functions:
handle = LoadLibraryA( libraryName.c_str() );
or
handle = LoadLibraryW( convertUTF8toUTF16(libraryName).c_str() );

My system is windows7 64bit and O am developing on Visual Studio 2008

thanks for your time!!
stef
Did you check LoadLibrary return value ?

Check glCalculations.dll for missing depedencies with DepedencyWalker tool.
yes I did check the return value... it is '0x000000' which was not very enlightening.

But! I would like to thank you for your help! I am new to this dll loading/unloading/dumping/exporting and I didn't know about this software DependencyWalker...

It is a remarkable program and helped me find out that I was indeed missing another dll - which should normaly exist. I guess it was a copy paste mistake.

Thanks again :) this thing cost me my whole Saturday
Topic archived. No new replies allowed.