简体   繁体   English

无法加载64位dll

[英]unable to load 64 bit dll

I am using "LoadLibraryA()" for loading my dll. 我正在使用“ LoadLibraryA()”加载我的dll。 Here is the code for loading dll I used - 这是加载我使用的dll的代码-

std::string m_sDllRegPath = "F:\\Releases\\SampleApp\\MyDll.dll";
m_hDll = LoadLibraryA(m_sDllRegPath.c_str());

But the problem is that value of m_hDll is always null, that it means it has failed to load the dll. 但是问题在于m_hDll的值始终为null,这意味着它无法加载dll。 A call to GetLastError returns 126. 调用GetLastError返回126。

But the same code works fine for 32 bit system. 但是相同的代码对于32位系统也可以正常工作。 I don't know where is the problem. 我不知道问题出在哪里。

Error code 126 is ERROR_MOD_NOT_FOUND : 错误代码126是ERROR_MOD_NOT_FOUND

The specified module could not be found. 指定的模块无法找到。

If there really is a DLL with the file name that you provide, then the explanation is that one of the DLL's dependencies is missing. 如果确实存在带有您提供的文件名的DLL,则说明该DLL的依赖项之一丢失了。 Almost invariably this is because the C++ runtime that is required by the DLL is not present. 几乎总是因为这是因为DLL所需的C ++运行时不存在。 Check the requirements of the DLL, and make sure that all required dependencies are correctly installed. 检查DLL的要求,并确保正确安装了所有必需的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 64位进程Vista中的64位dll失败-无法加载DLL'dllname':找不到指定的模块 - 64 bit dll in 64 bit process Vista fails - Unable to load DLL 'dllname': The specified module could not be found 无法在C#中加载64位dll错误 - Unable to load 64-bit dll Error in C# 64位进程中的AnyCPU C#DLL无法引用64位C ++ DLL(提供错误:无法加载文件或程序集) - AnyCPU C# DLL in 64bit process is unable to refer 64 bit C++ DLL(Giving error: Could not load file or assembly) 无法将xerces2_7.dll与64位应用程序链接 - Unable to link xerces2_7.dll with 64 bit application 无法在AMD 64位平台JNI上加载IA 32位.dll - Can't load IA 32-bit .dll on a AMD 64-bit platform JNI 64 位 ruby​​ 中使用的 Win32OLE 无法加载 32 位 C++ Dll - Win32OLE used in 64 bit ruby cannot load 32 bit C++ Dll 如何生成64位.dll哪个gcc编译器或其他。无法在AMD 64位平台上加载IA 32位.dll - How to generate 64 bit .dll which gcc compiler or other. Can't load IA 32-bit .dll on a AMD 64-bit platform 无法使用dyn.load Windows 7 64bit在R中加载dll文件 - Can't load a dll file in R using dyn.load windows 7 64bit 将 32 位 dll 转换为 64 位 - Converting 32 bit dll to 64 bit 部署的64位C#应用程序无法加载非托管DLL - Deployed 64bit c# application can't load unmanaged dll
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM