Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

converting c++ code to c#


I have c++ code that interfaces the a PC-DIO-96 board (or equivalently a USB-6509).  I'd like to convert my code to c#.  There are a few examples of c# code but they're very simple.  I can use PInvoke from c# to call c++ functions but I'd rather use c# function calls directly.  Does anyone know where I can find a listing of c# functions with appropriate namespaces and which dll's if any I need for c#?  Thanks.

0 Kudos
Message 1 of 4

Hi Gene,


In the next links you can find the help documents for Measurement Studio, there you can find some additional examples and syntaxis for C# code.


Measurement Studio 2012 for Visual Studio 2010 Help


NationalInstruments.UI.WindowsForms Namespace


Using the Measurement Studio Windows Forms .NET Controls


Hope this can help.

Best regards,
Cesar Ortega
Technical Support Engineering
National Instruments
0 Kudos
Message 2 of 4



I found some c# examples but (1) they're very simple and don't correlate very well to the code I need to convert and (2) when I tried to build one of the examples, I get an error on the NationalInstruments.DAQmx namespace - error CS0234: The type or namespace name 'DAQmx' does not exist in the namespace 'NationalInstruments' (are you missing an assembly reference?).  Normally I add a reference to a DLL that contains a namespace I want to use.  The namespace NationalInstruments.DAQmx is referenced but what DLL contains that namespace?.  Evidently that DLL is not begin accessed by the sample program.


Thank you,



0 Kudos
Message 3 of 4

Please disregard my last message.  The .NET libraries weren't installed, once I installed them the sample programs built successfully.



0 Kudos
Message 4 of 4