This project consists of a single .cpp file which calls LoadLibrary() to load a dll-file.
What happens is that if I run the following through the Microsoft Visual Studio 2012 Command Prompt:
cl /nologo Test.cpp
Everything works fine.
On the other hand, if I start up a simple Visual C++ project, add the file and compile it through there, the LoadLibrary() call fails with code 126: The specified module could not be found.
The .exe I build from the command line is more than twice the size of the one built in Visual Studio. So I guess there’s some static linking going on.
The .dll-file is fine, and it’s in the same directory as the .exe-file.
I figured it out.
By default the cl command uses the multibyte character set. While new projects set up in Visual Studio are configured for unicode.