User`s manual

76 Application Hints
PCIS-DASK
Interrupt Event Message Programming Hints
4.6 Interrupt Event Message Programming Hints
The PCIS-DASK comes with two methods of performing interrupt
occurrence notification for NuDAQ DIO cards that have dual-inter-
rupt system.
The Event Message method handles event notification through
user-defined callbacks and/or the Windows Message queue (for
VB5, through user-defined callbacks only). When a user-specified
interrupt event occurs, PCIS-DASK calls the user-defined callback
(if defined) and/or puts a message into the Windows Message
queue, if you specified a window handle. After receiving the mes-
sage, the user's application can carry out the appropriate task.
The event message mechanism is easy and safe in Windows
®
98
and Windows
®
NT systems. However, the time delay between the
event and notification is highly variable and depends largely on
how your system is loaded. In addition, if a callback function is
called, succeeding events will not be handled until your callback
has returned. If the time interval between events is smaller than
the time taken for callback function processing, the succeeding
events will not be handled. Therefore this mechanism is not suit-
able for the frequent events occurrence condition.
The Event Status checking and waiting method handles interrupt
event status checking through Win32 wait functions, such as Wait-
ForSingleObject or WaitForMultipleObjects. This method is useful
for situations when the interrupt event occurs very often and when
the applications written in the language doesn't support function
pointers (e.g. VB4).