LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can CVI libraries be used in C# applications

I have a CVI application to perform data acquisition.  I want to create a GUI in C# that can do the same thing.  Is this easy to do?

0 Kudos
Message 1 of 2
(2,950 Views)

You cannot call CVI UI library functions directly in C# as CVI libraries are not .NET assemblies. In .NET, you can call C functions from a DLL using the Platform Invocation (PInvoke) mechanism, but it would not make sense to call UI functions this way if you want your GUI to be .NET.

If you want to recreate your GUI/application in C# then you should probably consider using Measurement Studio. That product has "Test and Measurement" .NET controls similar to CVI.

If you already have a .NET application and just want it to display an existing CVI GUI, then you may want to consider building the CVI GUI code into a DLL and calling it from .NET using PInvoke. But note that mixing different UI frameworks can be challenging - so this may work only if the CVI code and .NET code are very independent and isolated from each other.

0 Kudos
Message 2 of 2
(2,931 Views)