InstrSession.GetHandleEx

Syntax

InstrSession.GetHandleEx( level)

Return Value

Variant

Returns a variant that contains the instrument API handle. The type of the variant matches the handle size the session uses for the current architecture ( VT_UI4 for 32-bit handles and VT_UI8 for 64-bit handles). VISA, IVI, and VXI plug&play handles are always 32-bit handles. NI Switch Executive and custom handles match the architecture.

Purpose

Returns the C-based instrument API handle to the driver for a specific interface level. The driver initializes, if necessary. If the session does not support the interface level you request, this method returns a zero-valued handle as an error.

Remarks

The session stores the API handle and manages its lifetime.

Note Do not dispose of the API handle.

Parameters

level As InterfaceLevel

[In] Specifies the type of API handle to return.