Problem with loading DLL
I wrote such LoadLib.cpp:
When I transfer to it, for example, D3DX9_42.dll, it loads with success. It also works with msvcp71.dll, atl71.dll and others. But when I run it with *80 or CShell.dll it shows these errors:


What's the problem?
Code:
#include "stdafx.h"
using namespace std;
int main(int argc, char* argv[])
{
if (argc == 1)
{
cout << "Please specify dll name with \".dll\" as argument" << endl;
}
else
{
char* libName = argv[1];
HMODULE handle = LoadLibraryA(libName);
if (handle)
cout << "Successfully loaded" << endl;
else
{
LPWSTR lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
//cout << "Error:\n" << lpMsgBuf << endl;
MessageBoxW(0, lpMsgBuf, L"GetLastError()", MB_ICONERROR);
// Free the buffer.
LocalFree( lpMsgBuf );
}
}
system("pause");
return 0;
}


What's the problem?
I'll try compile with 2012 version (probably *80 DLL's corresponds to VS 2012 runtime)