c # Unable to load DLL: The specified module could not be found (Exception from HRESULT: 0X8007007E)

c # Unable to load DLL "xxxx": The specified module could not be found (Exception from HRESULT: 0X8007007E) of a solution

A former c # project, when running today appeared suddenly found the following error when calling DLL.

 

Heart is very surprised, obviously worked earlier, and how incorrect report today. Do not modify the code, there is no path to DLL errors.

Later see friends say DLL files can be analyzed using this software depends, it brought a try. Sure enough, I found the problem. Library previous version of the compiler and library calls now compiler invokes not the same.

depends can be downloaded from the Internet: http: //www.dependencywalker.com/

Usage depends as follows:

 

Open DLL need to call:

 

Find

 

There are files missing prompt, careful comparison debug folder under the corresponding DLL library, find the file is different, re-download the corresponding version of the library, the problem is solved

c # DLL calls when the call fails only if reported to say: xxxxDLL not find the specified module, do not give the exact error where, so sometimes bring misleading. So using this depends can help solve the problem, but take note of this tool paths sometimes because of problems will be false positives, so when in use need to be carefully some of the.
----------------
Disclaimer: This article is CSDN blogger "Once Upon a dark day" in the original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/yxl0011/article/details/53491575

Guess you like

Origin www.cnblogs.com/Leo_wl/p/11412373.html