HP (Hewlett-Packard) Drive Network Card User Manual


 
Advanced Topics
109
IVI-COM
This C# example shows interchangeability using IIviDriver, which references all of
IVI’s inherent capabilities.
IIviDriver
1 Create a string variable for logical name.
string logicalName = "AgilentDriver"
;
2 Add a reference to the Session Factory. Go to Project and Add Reference.
Select the IVI Session Factory Type Library under the COM tab.
3 Create an instance of the Session Factory.
IIviSessionFactory factory = new IviSessionFactoryClass();
4 Set the type to match the referenced IVI Instrument Class, for class
interchangeability. This example uses IIviDriver, because it is common to all
drivers. This uses the Session Factory to create a driver based on the logical
name "AgilentDriver."
5 In the Configuration Store, logical name "AgilentDriver" points to a driver
session. The driver session points to a software module, which can be any IVI-
COM driver. The Session Factory creates an instance of the driver and returns