• Advertisement
Sign in to follow this  

LoadLibrary compatibility?

This topic is 4042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im having some problems with windows LoadLibraryEx which dynamically loads a dll into the app. I have a console dll and i am loading it from a win32 dll. Could that cause a problem? Or could it be because the dll i am loading is using CUDA (nvidias GPU programming tool). I have no idea why it doesnt work but LoadLibraryEx keeps returning NULL pointers. If I load in another dll all is fine. Thanks in advance. -CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
At the risk of stating the obvious, make sure that the file is actually at the path you are passing in (or in the path if you aren giving a full path).

You could also call GetLastError() to see what error code, if any, is being set.

Share this post


Link to post
Share on other sites
And what does that give you when you spit it into the error lookup tool? (I don't have the error lookup tool installed here)

Share this post


Link to post
Share on other sites
hmm seems that is the code for module not found. But the module is there and the path correct. Very strange Ill get to the bottom of this. Thanks again for the tip.

Share this post


Link to post
Share on other sites
Hey guys.

Silly me. I solved the problem. Seems Cuda needed some external dependencys and windows wouldnt give me a dll not found error message. Adding these dlls to the folder made it worked. Strange that the error code would tell me that the module isnt found.

Thanks again guys.

-CProgrammer

Share this post


Link to post
Share on other sites
Quote:
Original post by CProgrammer
Hey guys.

Silly me. I solved the problem. Seems Cuda needed some external dependencys and windows wouldnt give me a dll not found error message. Adding these dlls to the folder made it worked. Strange that the error code would tell me that the module isnt found.

Thanks again guys.

-CProgrammer
Ah, yeah - the "module not found" message refers to the additional DLL that Cuda couldn't find.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement