GetInstrumentHandle Method

NI Signal Generators Help (NI-FGEN 18.1)

Edition Date: April 2018

Part Number: 370524V-01

»View Product Info
Download Help (Windows Only)

NIFgen Class See Also


Gets the SafeHandle to the NIFgen instrument session.

Namespace: NationalInstruments.ModularInstruments.NIFgen

Assembly: NationalInstruments.ModularInstruments.NIFgen.Fx40 (in NationalInstruments.ModularInstruments.NIFgen.Fx40.dll) Version: 18.1.0.4 (18.1.0.4)

Syntax

Visual Basic (Declaration)
Public Function GetInstrumentHandle As SafeHandle

C#
public SafeHandle GetInstrumentHandle()

Return Value

The SafeHandle to the NIFgen instrument session.

Exceptions

ExceptionCondition
ObjectDisposedException GetInstrumentHandle was called after the associated NIFgen or FgenDriverUtility 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 SafeHandle.DangerousGetHandle.

See Also

Reference

NIFgen Class

NationalInstruments.ModularInstruments.NIFgen Namespace

WAS THIS ARTICLE HELPFUL?

Not Helpful