C++ LoadLibrary() from the current path

Posted by gillyb on Stack Overflow See other posts from Stack Overflow or by gillyb
Published on 2010-12-27T13:25:53Z Indexed on 2010/12/27 13:54 UTC
Read the original article Hit count: 159

Filed under:
|

Hey,

I'm a .net developer mostly, doing something small in C++ so im having a little trouble.

I'm loading another C++ dll using hInst = LoadLibrary(TEXT("mydll.dll")); and I came to realize that this looks for the dll I'm trying to load in 'C:\' or in 'system32'.

Can someone show me how to load the dll from the current directory (without knowing what the current directory is ahead of time) ??

I know I should be using something like GetFullPathName but I'm having a little trouble getting it to work on my own...

© Stack Overflow or respective owner

Related posts about c++

Related posts about dll