NIScope.GetInstrumentHandle Method
- Updated2023-09-06
- 1 minute(s) read
NIScopeGetInstrumentHandle Method
Gets the SafeHandle to the NIScope instrument session.
Namespace: NationalInstruments.ModularInstruments.NIScope
Assembly: NationalInstruments.ModularInstruments.NIScope.Fx45 (in NationalInstruments.ModularInstruments.NIScope.Fx45.dll) Version: 2023
Syntax
public SafeHandle GetInstrumentHandle()
Public Function GetInstrumentHandle As SafeHandle
Return Value
Type: SafeHandleThe SafeHandle to the NIScope instrument session.
Exceptions
| Exception | Condition |
|---|---|
| ObjectDisposedException | GetInstrumentHandle was called after the associated NIScope object was disposed. |
Remarks
Using the SafeHandle, you can get the IntPtr to the session;
however, there are risks involved with using the IntPtr. It is difficult to know the state of the handle, and the handle could be recycled while you are using it.
For more information, refer to
DangerousGetHandle.