Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an update to ni488.h for visual c.net?

I've been trying to create an interface for a Network Analyzer with an ni488.2 gpib system, and I can't get it to work. When I compile even the sample code given by automation explorer, I get 121 errors, the first involving PVOID, which I can't find an identifier for. I'm using visual studio.net, and I'm wondering if it's a compatability issue. Any suggestions?
Thank you
Andy Kass
0 Kudos
Message 1 of 4
(3,367 Views)
Regarding PVOID, it looks like Microsoft is still Microsoft. MSDN says that Windows Data Types include PVOID, but doesn't say which #include file declares it. In VC++6, PVOID was declared in WINNT.H, which was included indirectly through a chain of other #include files into all projects built by the VC++ wizard. Of course in your own source files you have to be sure to put #include ni488.h AFTER the #include directives that were generated by the wizard.

Where did Microsoft put the declaration of PVOID in VC++.net, or is MSDN completely lying, who knows. I bought .net for myself at home but haven't installed it yet, sorry.
0 Kudos
Message 2 of 4
(3,367 Views)
This kind of questions are sometimes posted. To use GPIB from .NET managed environment, the easiet way is use VISA COM software. The VISA COM software is available on every PC which installs NI-VISA 3.0. I posted a C# example using VISA COM at the following post. Basically the approach is the same for VB.NET and VC++.NET.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000047A30000&USEARCHCONTEXT_CATEGORY_0=_26_%24_13_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_26_%24_13_&UCATEGORY_S=0

Makoto
0 Kudos
Message 3 of 4
(3,367 Views)
Hello Andy,
Contact NI via email (www.ni.com/ask) for information on where to get a beta .Net Language interface.
0 Kudos
Message 4 of 4
(3,367 Views)