viUninstallHandler

NI-VISA

viUninstallHandler

Purpose

Uninstalls handlers for events.

C Syntax

ViStatus viUninstallHandler(ViSession vi, ViEventType eventType, ViHndlr handler, ViAddr userHandle)

Visual Basic Syntax

N/A

Resource Classes

All I/O session types

Parameters

Name Direction Description

vi

IN

Unique logical identifier to a session.

eventType

IN

Logical event identifier.

handler

IN

Interpreted as a valid reference to a handler to be uninstalled by a client application.

userHandle

IN

A value specified by an application that can be used for identifying handlers uniquely in a session for an event.

Return Values

Completion Codes Description

VI_SUCCESS

Event handler successfully uninstalled.

 

Error Codes Description

VI_ERROR_INV_OBJECT

The given session reference is invalid.

VI_ERROR_INV_EVENT

Specified event type is not supported by the resource.

VI_ERROR_INV_HNDLR_REF

Either the specified handler reference or the user context value (or both) does not match any installed handler.

VI_ERROR_HNDLR_NINSTALLED

A handler is not currently installed for the specified event.

Description

The viUninstallHandler() operation allows applications to uninstall handlers for events on sessions. Applications should also specify the value in the userHandle parameter that was passed while installing the handler. VISA identifies handlers uniquely using the handler reference and this value. All the handlers, for which the handler reference and the value matches, are uninstalled. Specifying VI_ANY_HNDLR as the value for the handler parameter causes the operation to uninstall all the handlers with the matching value in the userHandle parameter.

Note  Calling viUninstallHandler() removes the specified handler from the list of active handlers on the given session. If no handlers remain for the specified event type, the VISA driver disables that event type on the given session. It is not valid for a user to call this operation from within a callback, because this may cause a deadlock condition within the VISA driver.

Related Topics

viDisableEvent

viEventHandler

viInstallHandler

VISA Resource Template