Specifications

Programming Examples ZVx
1043.0009.50 D.10 E-2
D.9.3 C / C++
Programming hints:
Access to the functions of the RSIB32.DLL (Windows platforms)
The functions of the RSIB32.DLL are declared in the header file RSIB.H. The DLL functions can be
linked to a C/C++ program in different ways.
1. Enter one of the supplied import libraries (RSIB.LIB or RSIB32.LIB) into the linker options.
2. Load the library using the function LoadLibrary() during runtime and determine the function
pointers of the DLL functions using GetProcAddress(). Before the end of the program, the
RSIB.DLL must be unloaded again using the function FreeLibrary().
When import libraries are used, the DLL is automatically loaded immediately before the application is
started. At the end of the program, the DLL is unloaded again unless it is still used by other
applications.
Access to librsib.so functions (Unix platforms)
The functions of librsib.so are declared in the header file RSIB.H. Upper/lower case characters
for file names are typically observed under Unix. The library functions are linked to a C/C++ program
by entering the -lrsib linker option.
The shared library librsib.so is automatically loaded on starting the application. The accessibility
(for example via standard path) of the library must be ensured. Refer to the beginning of this main
chapter under Unix Environment“.
Query of strings
If instrument responses are to be further processed as strings, a zero termination must be
appended.
Example:
char buffer[100];
...
RSDLLibrd( ud, buffer, &ibsta, &iberr, &ibcntl );
buffer[ibcntl] = 0;