Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I port a vb6 app using NIDMM to .net?

I wrote a VB6 app to communicate to my PXI cage and the NI-4070 dmm, which worked. I then installed VS.NET and ran the upgrade wizard. Calls to the various P&P functions, such as niDMM_ConfigureACBandwidth were changed by the wizard to niDMM_32.niDMM_32Functions.niDMM_ConfigureACBandwidth. There were numerous instances of errors generated by the wizard of the form "niDMM_32Functions is not a member of niDMM_32". And sure enough, if I type "niDMM_32.", all I have for choices are IVIConstants and NIDMMConstants. How do I call these functions?
0 Kudos
Message 1 of 2
(3,195 Views)
In order to make DMM function calls in Visual Studio .NET you will need to use the DllImportAttribute class. The NI-DMM Application Programming Interface (API) currently doesn't support direct calls to the NI-DMM dll through Visual Studio .NET.

I have included two links that help explain this
Developer Zone : Using IVI Specific Drivers in Visual Basic 6.0, Visual Basic .NET, or Visual C# .NE...




MSDN Library Document: Using Win32 and Other Libraries


Good luck,
Michael Taylor
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,195 Views)