在VS中调用一个资源模块dll,LoadLibrary返回值为NULL,没有加载成功。GetLastError后原因为“找不到指定的模块”!代码如下:

    HINSTANCE hInst = ::LoadLibrary(_T("E:\Test\KvDumpTool\Debug\kvDumpToolCHS.dll"));
if (hInst)
{
AfxSetResourceHandle(hInst);
}

  解决方法:(dll字符串路径使用双斜杠!)

    HINSTANCE hInst = ::LoadLibrary(_T("E:\\Test\\KvDumpTool\\Debug\\kvDumpToolCHS.dll"));
if (hInst)
{
AfxSetResourceHandle(hInst);
}

  相信好多人的情况不是上述问题,另外可能的原因就是该dll缺少依赖项,赶紧用Dependency Walker去检查一下吧!

  

VC++ LoadLibrary失败,错误126(找不到指定的模块)的更多相关文章

  1. Win10 pip install augimg 报 OSError: [WinError 126] 找不到指定的模块,解决办法

    第一种Win10下python成功安装augimg的方法: 下载Shapely,地址https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely,选择对应版本 ...

  2. SQL Server (MSSQLSERVER) 服务因 找不到指定的模块。 服务特定错误而停止。

    新装了sql server 2008,发现sqlserver 服务没法起来.查看系统日志是7024如下: 事件类型: 错误 事件来源: Service Control Manager 事件种类: 无 ...

  3. 注册OCX失败/ 找不到指定的模块

    错误信息:模块“*.OCX”加载失败,请确定二进制保存在指定的路径中,或者调试它以检查该二进制或相关的.dll文件是否有问题 对于电脑新手,关于OCX或DLL缺失是一件令人十分头疼的事,如果不幸遇到此 ...

  4. robotframework启动ride失败,提示wxpython ImportError: DLL load failed: 找不到指定的模块

    背景:按照rf的操作,安装是没有问题,就是在启动ride.py 这个文件,就有问题了,提示 wxpython ImportError: DLL load failed: 找不到指定的模块 在pytho ...

  5. LoadLibrary(C:\soft\IDA 7.0\IDA 7.0\plugins\python64.dll) error: 找不到指定的模块。 C:\soft\IDA 7.0\IDA 7.0\plugins\python64.dll: can't load file LoadLibrary(C:\soft\IDA 7.0\IDA 7.0\plugins\python64.dll) erro

    LoadLibrary(C:\soft\IDA 7.0\IDA 7.0\plugins\python64.dll) error: 找不到指定的模块. C:\soft\IDA 7.0\IDA 7.0\p ...

  6. Windows下安装Tensorflow报错 “DLL load failed:找不到指定的模块"

    Windows下安装完tensorflow后,在cmd下运行python后import tensorflow出现如下错误: Traceback (most recent call last):  Fi ...

  7. kivy sdl2 - ImportError: DLL load failed: 找不到指定的模块

    from kivy.app import App from kivy.uix.button import Button class TestApp(App): def build(self): ret ...

  8. c# 无法加载DLL:找不到指定的模块(异常来自HRESULT:0X8007007E)

    c# 无法加载DLL“xxxx”:找不到指定的模块(异常来自HRESULT:0X8007007E)的一个解决方法 以前的一个c#项目,今天运行的时候突然发现调用DLL时出现了下面的错误. 心中很诧异, ...

  9. SQLite 解决:Could not load file or assembly 'System.Data.SQLite ... 试图加载格式不正确的程序/or one of its dependencies. 找不到指定的模块。

     Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. 找不到指定的模块. 错误提示 ...

随机推荐

  1. unzip 命令使用

    http://blog.sina.com.cn/s/blog_6c9d65a10100nzqf.html unzip命令:解压缩文件 他是解压zip压缩的文件,和zip互逆的一对工具.   命令: u ...

  2. Codeforces Round #268 (Div. 2) ABCD

    CF469 Codeforces Round #268 (Div. 2) http://codeforces.com/contest/469 开学了,时间少,水题就不写题解了,不水的题也不写这么详细了 ...

  3. iPad 多任务 Spilt View & Size Class

    iPad 多任务 Spilt View & Size Class 一.多任务简介 iOS 9 以后iPad新增了多任务的支持,主要形式有三种: Slide Over (侧边快捷打开) Spil ...

  4. IEnumerable<> ICollection <> IList<> 区别

    IEnumerable< ICollection < IList区别 public interface IEnumerable { IEnumerator GetEnumerator(); ...

  5. Back to Edit Distance(LCS + LIS)

    Given 2 permutations of integers from 1 to N, you need to find the minimum number of operations nece ...

  6. cocos布局分析

    HBox和VBox布局 HBox只是一个水平布局包装类. HBox里面所有的孩子节点都会水平排列成一行 VBox仅仅是对垂直布局的一个简便的类封装. VBox把它的子节点布局在一竖列中. Layout ...

  7. PHP函数 rtrim() 的一个怪异现象

    今天用rtrim()函数时遇到了一个奇怪的问题: echo rtrim('<p></div>', '</div>'); // 输出为 <p echo ltri ...

  8. 9.4用WebApi去连接外部认证服务

    原文链接:http://www.asp.net/web-api/overview/security/external-authentication-services VS2013和Asp.Net4.5 ...

  9. HashMap原理分析

    HashMap 实现Map.Cloneable.Serializable接口,继承AbstractMap基类. HashMap map = new HashMap(); 实例化一个HashMap,在构 ...

  10. C#GDI+编程基础(一:Graphics画布类)

    GDI+存在的意义:将变成与具体硬件实现细节分开. GDI+步骤:获取画布,绘制图像.处理图像 命名空间: using System.Drawing;//提供对GDI+基本图形功能的访问 using ...