Alex Rivera | Logout

LoadLibrary() error code 127

Asked 2009-06-27T16:52:57.417
28

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?

Edit
Report

1 Answer

4

Install Debugging tools and run the gflags -i your_application.exe +sls. After that execute application under the debugger to capture the loader traces.

answered 2011-08-19T08:41:57.240

Your Answer