Microsoft Visual C - HP 85097A User Manual

Electronic calibration system
Table of Contents

Advertisement

Software Programming Interface

Microsoft Visual C++

Microsoft Visual C++
This section provides hints about programming in the Microsoft C++
environment.
An example of the Visual C++ program is provided in the
<root ecal>\ install directory under examples\cpp\.
Read the file example_cpp.txt for a walkthrough of how to build the
basic skeleton in C++ code.
A workspace complete with all source files is provided under
<root ecal>\examples\cpp.
Please note that <root ecal>\examples\cpp has several hard-coded
NOTE
values, such as the type and logical number of the HP-IB (IEEE-488)
card, VNA address, and so forth. You need to recompile the application
for your specific setup to have it work for your application.
The hard-coded values of interest appear in line 199 of
spi_exampleDlg.cpp:
board_type=2;
board_num=0;
vna_address=16;
printer_port=1;
These hard-coded values specify a National Instruments IEEE-488 card
with parallel port one. If your system values do not match, correct the
values. Then you must recompile the example to make it work. Refer
to"CONFIG" on page
3-19.
Some BSTR conversion functions are provided in the example code to
make accessing the OLE object easier. Please note that the
MakeBstrFromStr function allocates memory, which the caller must
deallocate when finished using the string. Refer to the example code
and example_cpp.txt for more information.
Chapter 3
3-7

Advertisement

Table of Contents
loading

Table of Contents