From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI-C vs. IVI-COM Drivers

I have recently downloaded an IVI-C Instrument specific driver from NI's website. For my application, I need a COM layer to communicate with other software that I am developing. If the driver that I had found would have been an IVI-COM driver, all of my problems would have been solved. However, this not being the case, I need some direction. Would it be easier to take the IVI-C driver and create a wrapper on top of it that would be a COM layer? Or should I attempt to rewrite the driver as an IVI-COM driver. Keeping in mind that I have very little experience developing drivers, my first inclination is to use the driver as is, and create another layer. However, if someone has any more knowledge that they could add to this, please d
o so. There must be an easy way to accomplish this, and it must have been done before. Any help is greatly appreciated.
0 Kudos
Message 1 of 4
(3,202 Views)
DPOrlando,

The IVI Foundation (http://www.ivifoundation.org/) has not standardized on an IVI-COM interface and most likely they won't ever do so. Instead they are planning to standardize on an IVI-.NET interface. So I would strongly suggest that you use the IVI-C driver and create a wrapper on top of it. Creating an IVI-COM driver will be a huge endeavor and that's one reason why the IVI Foundation decided to standardize on .NET and skip COM.

Just my 2 cents.

Azucena
0 Kudos
Message 2 of 4
(3,202 Views)
Actually, I did some more research and it turns out that the IVI foundation does have a COM spec. However creating an IVI-COM driver is not a trival ask as I had mentioned before so I stand by what I said regarding creating a wrapper.

I wanted to point out that National Instruments offers IVI ActiveX controls to provide a more Visual Basic-friendly programming interface than using standard instrument driver DLLs.
These IVI ActiveX controls as well as VC++ wrappers for IVI classes come with Measurement Studio Full Development System (FDS). For more info, go to:

http://www.ni.com/mstudio
0 Kudos
Message 3 of 4
(3,202 Views)
If you just create a thin COM wrapper for existing IVI-C driver, it is not so hard. It looks like writing a C++ wrapper class that encapsulates the Instrument Session Handle (or ViSession). You can write the COM wrapper component with C++/ATL or VB.

If you create a true IVI-COM wrapper that is strictly compliant with the IVI specifications, it is definitely hard because an IVI-COM driver (including wrapper) must implement all the required COM interfaces (all defined as IIviXXXX by IVI specification) and their behaviours.

Makoto
Message 4 of 4
(3,202 Views)