
30
Agilent VISA User’s Guide
3
Programming with VISA
Using Sessions
This section shows how to use VISA sessions, including:
•
Including the VISA Declarations File (C/C++)
•
Adding the
visa32.bas
File (Visual Basic)
•
Opening a Session to a Resource
•
Addressing a Session
•
Closing a Session
•
Searching for Resources
Including the VISA Declarations File (C/C++)
For C and C++ programs, you must include the
visa.h
header file at
the beginning of every file that contains VISA function calls:
#include "visa.h"
This header file contains the VISA function prototypes and the
definitions for all VISA constants and error codes. The
visa.h
header
file also includes the
visatype.h
header file.
The
visatype.h
header file defines most of the VISA types. The
VISA types are used throughout VISA to specify data types used in the
functions. For example, the
viOpenDefaultRM
function requires a
pointer to a parameter of type
ViSession
. If you find
ViSession
in the
visatype.h
header file, you will find that
ViSession
is eventually
typed as an unsigned long. VISA types are also listed in
VISA System
Information
in the
VISA Online Help
.
Adding the
visa32.bas
File (Visual Basic)
You must add the
visa32.bas
Basic module file to your Visual Basic
project. The
visa32.bas
file contains the VISA function prototypes
and definitions for all VISA constants and error codes.
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...