DLLs and LoadLibrary

Jani tiainen redetin@luukku.com
Thu Jul 22 06:52:00 GMT 2004


Vadim Berezniker wrote:

> I followed the FAQ and the various mailing list messages and was able to 
> build a dll that I can load with LoadLibrary.
> The code inside the DLL makes calls to code in other libraries and for 
> the most part this is okay.
> When I make calls to one library, everything is OK. As soon as I 
> uncomment one line which is simply a call to a function in another 
> library, the resulting DLL cannot be loaded with LoadLibrary.

There is various reasons why loading fails. If you get NULL from 
LoadLibrary call, use GetLastError to retrieve real reason for error.

BTW, where are you calling those LoadLibrary calls? It's unsafe (and not 
really recommended) to call them in DllMain.

-- 

Jani Tiainen


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list