Home
Support
当在装有DAQmx的Visual Studio 2005 Visual C# 或者Visual Basic .NET中使用Modular Instruments .NET时,出现'Failure Loading Driver Module' 错误
当在装有DAQmx的Visual Studio 2005 Visual C# 或者Visual Basic .NET中使用Modular Instruments .NET时,出现"Failure Loading Driver Module" 错误
主要软件:
主要软件版本: 2.5
主要软件修正版本: N/A
次要软件: Driver Software>>NI-DAQmx, Driver Software>>NI-DAQ, Measurement Studio>>Measurement Studio for .NET Support
问题: 我在Microsoft Visual Studio 2005中,通过Visual C#或Visual Basic使用NI模块化仪器,如NI-SCOPE,NI-FGEN等。我也在同一应用程序中使用NI-DAQmx。 NI-DAQmx.NET DLL取决于NationalInstruments.Common.dll。当我添加了一个参考的NationalInstruments.Common.dll至项目,我收到“Failure Loading Driver Module”异常。我怎样才能解决这个错误?
解答: 这个问题和KB2Q1HG8A6中描述的问题类似,"Unusual Error Messages Loading, Executing, or Debugging an Application When Using NI-DAQ for Windows." 发生此问题,因为模块化仪器使用了传统NI-DAQ的一些基本功能。在Visual Studio 2005中调试应用程序时,有DLL基地址的冲突出现,不允许正确地加载驱动程序。 Visual Studio 2005加载了一些额外的DLL,将NationalInstruments.Common.dll作为参考。这个情况只针对于Visual Studio 2005,并不会发生在Visual Studio.NET 2003中。
注:此问题只发生在正在调试的应用程序中。此问题将不会发生于已部署的应用程序。
要调试应用程序和维护功能,请完成以下步骤:
在项目属性中,在调试下,取消Enable the Visual Studio的勾选框。
在相同的属性页中,勾选启用非托管代码调试选项来解决这个问题。更改这些选项可以防止Visual Studio 2005中加载DLL加载地址造成这个问题。详细信息请参阅相关链接。
相关链接: KB ID: 2Q1HG8A6: Unusual Error Messages Loading, Executing, or Debugging an Application When Using NI-DAQ for Windows
附件:
报告日期: 09/22/2006
最近更新: 10/09/2013
文档编号: 40R9K8TX
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.