简体   繁体   English

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

I have a native C code, I compiled the code in vc++ 2008 and its compiled with 'x64' as platform in configuration manager and I have an c# application which is also compiled with 'x64' as platform and it calls the dll function. 我有一个本机C代码,我在vc ++ 2008中编译了该代码,并在配置管理器中以“ x64”作为平台对其进行了编译,还有一个c#应用程序,该应用程序也以“ x64”作为平台进行了编译,它调用了dll函数。 I have used Dllimport to call the function from the dll like below. 我已经使用Dllimport从dll中调用函数,如下所示。

using System.Runtime.InteropServices;

namespace test            
{    
public partial class Form1 : Form                                                     
  {

      [DllImport("mtest", CharSet = CharSet.Ansi)]
        public extern static void e_path(string path);

        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("test");
            swe_set_ephe_path("E:\\Gan");
        }
    }
}

at the time of running the application I am getting the error as below: 在运行应用程序时,出现以下错误:

An unhandled exception of type 'System.DllNotFoundException' occurred in test.exe test.exe中发生了'System.DllNotFoundException'类型的未处理异常

Additional information: Unable to load DLL 'mydll': The specified module could not be found. 附加信息:无法加载DLL“ mydll”:找不到指定的模块。 (Exception from HRESULT: 0x8007007E) (来自HRESULT的异常:0x8007007E)

Could any you please help me out to resolve this. 能否请您帮我解决这个问题。 If I run both the dll and the applicaition its working fine. 如果我同时运行dll和applicaition,则其工作正常。 But I need the dll functions to be called from my ASP pages so I need both the dll and application as 64 bit. 但是我需要从我的ASP页面中调用dll函数,因此我需要dll和应用程序均为64位。

ADDITIONAL INFORMATION : when I checked the dll for dependency using dependency walker for 64-bit It shows that the Kernel32.dll and NTDLL.DLL and mydll.dll is x64. 其他信息:当我使用64位依赖关系行程序检查dll的依赖关系时,它表明Kernel32.dll和NTDLL.DLL以及mydll.dll是x64。

please help me out with this. 这个你能帮我吗。

Thanks in Advance, 提前致谢,

on x64 platforms the SYSWOW64 directory contains files for 32bit applications. 在x64平台上,SYSWOW64目录包含用于32位应用程序的文件。 You will find the same differentiation in the registry, where SYSWOW64 contains entries for x32 applications. 您将在注册表中找到相同的区别,其中SYSWOW64包含x32应用程序的条目。 Greetings 问候

Comment: The registry key containing 32bit entries is Wow6432Node and resides in //HKEY_LOCAL_MACHINE 注释:包含32位条目的注册表项是Wow6432Node,位于// HKEY_LOCAL_MACHINE中

问题在于您的dll依赖于其他某个dll,并且无法找到其他dll,因为它位于加载程序无法搜索它的某个路径上,或者该dll不是64位。

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

相关问题 找不到指定的模块-64位dll - The specified module could not be found - 64 bit dll 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) 无法加载 DLL 'ABCpdf9-64.dll'。 找不到指定的模块(来自 HRESULT 的异常:0x8007007E) - Unable to load DLL ‘ABCpdf9-64.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E) 无法加载DLL:找不到指定的模块 - Unable to load DLL: The specified module could not be found 无法加载DLL'mydll.dll':找不到指定的模块 - Unable to load DLL ' mydll.dll': The specified module could not be found 无法加载DLL'UNRAR.DLL':找不到指定的模块 - Unable to load DLL 'UNRAR.DLL': The specified module could not be found 无法加载DLL'libcurl.dll':找不到指定的模块 - Unable to load DLL 'libcurl.dll': The specified module could not be found 无法加载 DLL 'git2.dll' 找不到指定的模块 - Unable to load DLL 'git2.dll' The specified module could not be found 将32位dll转换为64位dll - Convert 32 bit dll to 64 bit dll 在vs 2008的64位操作系统和32位进程中找不到oraops.dll - oraops.dll not found in 64 bit os and 32 bit process of vs 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM