閱讀895 返回首頁    go 微軟 go windows


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域控中文版本域策略問題