HP (Hewlett-Packard) Drive Network Card User Manual


 
78
Chapter 8
#import "IviDmmTypeLib.dll" named_guids,
raw_interfaces_only, raw_native_types no_namespace
#import "Agilent34401.dll" named_guids, raw_interfaces_only,
raw_native_types no_namespace
#endif
Note:
This header file allows access to the COM, IVI-specific, and device
environments.
2 From the PAWS Project window, select the ctrl.cpp file. Insert the following
code in the ctrl.cpp file directly below #include "key.h" code:
#include "DMM.h"
extern CComPtr<IAgilent34401> driver;
extern CComPtr<IAgilent34401DCVoltage> pDMMDCVolt;
extern CComPtr<IAgilent34401Trigger> pDMMTrig;
extern CComPtr<IAgilent34401Measurement> pDMMData;
extern HRESULT hr;
3 From the PAWS Project window, select the DMM.cpp file. Insert the following
code in the DMM.cpp file directly below #include "key.h" code:
#include "DMM.h"
CComPtr<IAgilent34401> driver;
CComPtr<IAgilent34401DCVoltage> pDMMDCVolt;
CComPtr<IAgilent34401Trigger> pDMMTrig;
CComPtr<IAgilent34401Measurement> pDMMData;
HRESULT hr;
4 To create the driver object and open an I/O session to the instrument with the
Initialize method, select the ctrl.cpp file from the PAWS Project window.
Note:
To determine the syntax for the commands you want to use in your program,
consult the driver help file.