阅读895 返回首页    go iPhone_iPad_Mac_apple


Windows 7 Service Pack 1 32位操作系统上 C# 应用程序无法调用 dll

HI, 你好:

      我在一台电脑上( Windwos 7 旗舰版 Service Pack 1 64位操作系统) 安装了VS2015,在VS2015中开发了一个C#应用程序,调用了一个dll库,C#应用程序可以正常运行。整个工程移植到另外一台 Windows 7 Service Pack 1 32位操作系统 电脑上后(该电脑也安装来了VS2015),C#应用程序无法运行,错误如下:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.DllNotFoundException: 无法加载 DLL“myTransmit.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
   在 USB_MFC.Main.stm32_usb_device_open()
   在 USB_MFC.Main.Main_Load(Object sender, EventArgs e) 位置 D:\trunk\上位机\USB_MFC\USB_MFC\Main.cs:行号 61
   在 System.Windows.Forms.Form.OnLoad(EventArgs e)
   在 System.Windows.Forms.Form.OnCreateControl()
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl()
   在 System.Windows.Forms.Control.WmShowWindow(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.Form.WmShowWindow(Message& m)
   在 System.Windows.Forms.Form.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
USB_MFC
    程序集版本:1.0.0.0
    Win32 版本:1.0.0.0
    基本代码:file:///D:/code/XTX_TOOLS/trunk/%E4%B8%8A%E4%BD%8D%E6%9C%BA/USB_MFC/USB_MFC/bin/x86/Debug/USB_MFC.exe
----------------------------------------
System.Windows.Forms
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    程序集版本:4.0.0.0
    Win32 版本:4.6.1055.0 built by: NETFXREL2
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    程序集版本:4.0.0.0
    Win32 版本:4.6.1055.0 built by: NETFXREL2
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

可能的原因是什么呢?谢谢!



最后更新:2017-11-28 19:05:06

  上一篇:go win10蓝屏报错
  下一篇:go windows server 2012 R2域控中文版本域策略问题