Keysight VISA.NET Help
The Native Access API

The Native Access API

The VISA.NET Native Access API is designed to give calling programs limited access to the underlying VISA C API. The underlying API for Keysight VISA.NET is typically Keysight VISA, but it is possible to use a different vendor's VISA under Keysight VISA.NET by installing that vendor's VISA as the primary VISA. Refer to the Keysight IO Libraries Suite Help for information on primary and secondary VISA.

The primary use for the Native Access API is to get access to VISA error information. Exceptions that reflect failures in the underlying VISA C are reported using the NativeVisaException exception class. You can cross-reference error status codes reported by this exception (refer to the NativeVisaException.ErrorCode property) to values defined in the NativeErrorCode class to identify the VISA error. Your program will need to use the Native Access API whenever VISA.NET throws a NativeVisaException.

Other than the NativeVisaException class, there is no real reason to use the Native Access API in Keysight VISA.NET, and Keysight recommends against it. However, it is provided on session classes for completeness. It is not provided on the ResourceManager class (for resource manager attributes) because the resource manager handle is not usually exposed to the calling program.

There are several uses for the Native Access API:

Ivi.Visa Native Access

The Ivi.Visa namespace defines several Native Access features:

Keysight.Visa Native Access

The Keysight.Visa namespace defines several Native Access features:

Accessing Native VISA Functions

Aside from the VISA functions used to access native VISA C events and attributes, as defined in the VISA.NET Native Access API, there is no direct access to VISA C methods in the Keysight VISA.NET API. Some significant VISA C functions are never called directly by VISA.NET, including functions that read and write to files and Formatted I/O functions like viPrintf and viScanf.

VISA.NET replaces the Formatted I/O features of VISA with a completely new and standard Formatted I/O interface and implementation, which is installed with the IVI Foundation VISA.NET Shared Components as a part of the Keysight IO Libraries Suite. Keysight VISA.NET uses the IVI implementation.

Accessing Native VISA Attributes

The following VISA attributes may only be accessed using the Native Access features of Keysight VISA.NET:

VISA attributes that are not available when using the Native Access features of Keysight VISA.NET:

 

 


© Keysight Technologies 2015-2025