visual c++ - LoadLibrary() error code 127 -


I'm having trouble with LoadLibrary () and get an error that I do not understand:

 : Setlist error (0); M_hDll = :: Load Library (szName); If (m_hDll == NULL) // failure to load DLL {DWORD error = GetLastError (); }  

The error is 127 ("The specified process was not found.") This makes no sense to call on Libri (). I have not said GetProcaddress () yet

Both DLL (and applications) are compiled with VS ++ 2005 SP1.

What could be wrong?

Take this step by step:

  1. error message Means that DLL was found but an essential function is missing. (Jitter is right.) This means that you need Dell, but not the right version. (Daftidis is correct, although the Microsoft Runtime Library can not only be a problem, and for at least big updates, Microsoft gives its runtime library different names, so in that case it will not be an issue.)

  2. This does not understand because no function has been requested by DLL loading. (Adam is right.)

  3. Therefore, the unavailable function was expected to not be found in DLL, which is clearly loaded by the Load Liberty Command, but a dependent DLL Is being fully loaded at the same time, because the first DLL is required. (Zebrakox was closed.)

  4. A dependent DLL is a DLL which has been explicitly loaded from "statically" library, through an import library or Lib file Includes clearly on the linker stage of the loaded DLL (I'm sure you did not know that "dynamic link library" "can be linked statically." Well, now you do.)

  5. If you have multiple versions different Folders have the same DLL, so this can be a search path problem (as suggested by Zebrabox). The DLL path search order is a complex subject in itself: see. It depends on the operating system, among other things, the most secure condition, where practical, has put all the potential problem dlls in the same folder as your exe.

  6. Dependent dlls may also depend on their own dependent dlls, which can be very difficult to solve this problem, but if this does not happen, try filemon The last DLL that has been successfully read before your error message is an incorrect version.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -