"Failure Loading Driver Module" Error When Using Modular Instruments .NET Wrappers with NI-DAQmx in Visual Studio 2005 Visual C# or Visual Basic .NET Primary Software: Driver Software>>NI-DMMPrimary Software Version: 2.5 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-DAQmx, Driver Software>>NI-DAQ, Measurement Studio>>.NET Support
Problem: I am using NI Modular Instruments, such as NI-Scope, NI-FGEN, and so on, with Visual C# or Visual Basic .NET in Microsoft Visual Studio 2005. I am also using an NI-DAQmx device in the same application. The NI-DAQmx .NET DLL depends on NationalInstruments.Common.dll. When I add a reference to NationalInstruments.Common.dll to the project, I receive "Failure Loading Driver Module" exceptions. How can I fix this error?Solution: This problem is related to the issue described in KB 2Q1HG8A6, "Unusual Error Messages Loading, Executing, or Debugging an Application When Using NI-DAQ for Windows." This problem occurs because Modular Instruments uses Traditional NI-DAQ for some of its underlying functionality. When debugging the application in Visual Studio 2005, there are DLL base address conflicts occuring, which do not allow the driver to load correctly. Visual Studio 2005 loads some additional DLLs when NationalInstruments.Common.dll is added as a reference. This behavior is specific to Visual Studio 2005 and does not occur in Visual Studio .NET 2003.Note: This problem only occurs when the application is being debugged. This issue will not occur with a deployed application. To debug the application and maintain functionality, complete the following steps:
Related Links: KB ID: 2Q1HG8A6: Unusual Error Messages Loading, Executing, or Debugging an Application When Using NI-DAQ for Windows Attachments:
Report Date: 09/22/2006 Last Updated: 04/10/2007 Document ID: 40R9K8TX |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
