132
Syntax
HRESULT WaitOnChangeEvent(
[in]long ChangeMask,
[in]long TimeOut,
[out, retval]long* Result
);
Parameters
ChangeMask
[in] A bit mask that defines which Events to watch for.
TimeOut
[in] Number of milliseconds to wait for an Event. If the timeout expires, the function returns
with Result set to 0.
Result
[out, retval] A bit-mask representing the Event(s) that cause the wait to terminate.
Remarks
This function will not return until one of the specified Events has happened. To be notified of a change, an
Event of the hardware type your interested in must already exist.
Or the following bits together to set the
ChangeMask
as desired. The
ChangeMask
bits are defined as
follows:
Bit Value
Bit # Description
0x00000001 Bit 0
One of the Variables changed
0x00000002 Bit 1
Serial data received on one of the serial ports
0x00000004 Bit 2
One of the digital input ports changed state
0x00000008 Bit 3
The input voltage on one of the A/D inputs changed
The Result parameter will contain either a mask of the triggered events, or one of the following values:
Error Value
Description
0xFFFFFFFF (-1)
Error occurred when trying to create the wait event.
0x00010000 (65536) The TimeOut expired. No events triggered.
0x00010001 (65537) The Wait aborted due to some error.