|Download Help (Windows Only)|
Enables notification of an event.
Assembly: NationalInstruments.VisaNS (in NationalInstruments.VisaNS.dll) Version: 126.96.36.199
|Visual Basic (Declaration)|
Public Sub EnableEvent ( _ customEventType As Integer, _ mechanism As EventMechanism _ )
public void EnableEvent( int customEventType, EventMechanism mechanism )
|VisaException||The NI-VISA driver returned an error as a result of calling this method.|
Invalid mechanism specified.
Specified event type is not supported by the resource.
|DllNotFoundException||The NI-VISA driver library cannot be found.|
|EntryPointNotFoundException||A required operation in the NI-VISA driver library cannot be found.|
|InvalidOperationException||A handler is not currently installed for the specified event.|
|ObjectDisposedException||This member is called after the Dispose method is called directly from code or indirectly through a finalizer.|
|Note: This method is provided for extensibility only and should not be used unless the event you want to enable is not available in the API.|
Specify Queue to enable the specified session to queue events. If the specified mechanism is Queue, you must call WaitOnEvent to wait for enabled events that might have occurred. When you specify Handler, applications can enable the session to invoke a callback method to execute the handler. In order to enable events with the Handler mechanism, applications must install at least one handler.