[英]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.