I'm having trouble with LoadLibrary() and getting an error that doesn't make sense to me:
::SetLastError(0);
m_hDll = ::LoadLibrary(szName);
if (m_hDll == NULL) // Failure to load the DLL.
{
DWORD err = GetLastError();
}
The error is 127 ("The specified procedure could not be found.") That doesn't make any sense to me on a call to LoadLibrary(). I haven't called GetProcaddress() yet.
The DLL (and the application) are both compiled with VS++ 2005 SP1.
What could be going wrong?