NI-SCOPE .NET Class Library Help

NIScope.GetInstrumentHandle Method

  • Updated2023-09-06
  • 1 minute(s) read
NIScope.GetInstrumentHandle Method

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: SafeHandle
The SafeHandle to the NIScope instrument session.

Exceptions

ExceptionCondition
ObjectDisposedExceptionGetInstrumentHandle 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.

See Also

Log in to get a better experience