# cbDisableEvent

Disables one or more event conditions and disconnects their user-defined handlers.

## Function Prototype

C/C++

int cbDisableEvent(int BoardNum, unsigned EventType)

Visual Basic

Function cbDisableEvent(ByVal BoardNum&, ByVal EventType&) as Long

## Arguments

BoardNum

The board number used to indicate which device's event handling will be disabled. BoardNum may be 0 to 99. Refers to the number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice().

EventType

Specifies one or more event conditions to disable. More than one event type can be specified by bitwise OR'ing the event types. Note that specifying an event that has not been enabled is benign and will not cause any errors. Refer to cbEnableEvent() for valid EventType settings.

To disable all events in a single call, use ALL_EVENT_TYPES.

## Returns

- Error code or 0 if no errors

## Notes

- For most event types, this function cannot be called while any background operations (cbAInScan(), cbAPretrig(), or cbAOutScan()) are active. Perform a cbStopBackground before calling cbDisableEvent(). However, for ON_EXTERNAL_INTERRUPT events, you can call cbDisableEvent() while the board is actively generating events.

### Important!

In order to understand the functions, refer to the board-specific information in the Universal Library User's Guide and also in the Readme files installed with the Universal Library. We also urge you to examine and run one or more of the example programs supplied prior to attempting any programming of your own. Following this advice may save you hours of frustration, and wasted time.

This note, which appears elsewhere, is especially applicable to this function. Now is the time to read the board specific information for your board. We suggest that you make a copy of that page to refer to as you read this manual and examine the example programs.