Keysight V3500A User Manual page 96

Handheld rf power meter
Hide thumbs Also See for V3500A:
Table of Contents

Advertisement

3
Driver Installation and Commands
int main(int
argc, char* argv[])
{
PMInterface *myPM = NULL;
BSTR Reply=NULL;
int
MeterAvailable=0;
int
SN;
USES_CONVERSION; // Enables use of ATL string conversion macros
CoInitialize(NULL); // Initializes the COM library on the current thread
// Create an instance of the V3500A driver:
HRESULT hr = CoCreateInstance(CLSID_KeysightV3500A,NULL, CLSCTX_INPROC_SERVER,
IID_PMInterface, reinterpret_cast<void**>(&myPM));
if
(FAILED(hr))
{
printf("Couldn't create an instance of the V3500A driver!... 0x%x\n", hr);
return
0;
}
// Set the serial number and check that the meter is available
SN=10973300; // Set this to the numerical serial number of your V3500A (without prefix)
try
{
MeterAvailable=myPM->IsDeviceAvailable(SN);
}
catch
(_com_error& e)
{
cout << "COM error on IsDeviceAvailable"<<endl;
dump_com_error(e);
return
0;
}
76
V3500A User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents