InstrSession.GetHandle
- Updated2025-07-21
- 1 minute(s) read
InstrSession.GetHandle
Syntax
InstrSession.GetHandle( level)
Return Value
Returns the instrument API handle.
Purpose
Note
This method is obsolete. Use the
InstrSession.GetHandleEx
method instead. NI Session Manager supports
InstrSession.GetHandle
to maintain compatibility. However, calling this method in a 64-bit application that uses 64-bit session handles results in an error.
Remarks
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. 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.