MouReadEventQue

Reads an event from the mouse device driver FIFO event queue and places it in a structure provided by the application.

Syntax
MouReadEventQue(EventMask, Wait, DeviceHandle);

Parameters

 * EventMask (PMOUENVENTINFO) - output : Pointer to the mouse-event queue.
 * Address of the mouse-event queue data.


 * Wait (PULONG) - input : Wait flag.
 * A pointer to a ULONG containing the action to take when MouReadEventQue is issued and the mouse event queue is empty. If the mouse event queue is not empty, this parameter is not examined by the mouse support.
 * May be one of the following values:
 * MOU_NOWAIT Do not wait for data on an empty queue (return a NULL record).
 * MOU_WAIT Wait for data on an empty queue.


 * DeviceHandle (HMOU) - input : Reserved. Must be 0.

Return Code
rc (APIRET) - returns MouReadEventQue returns one of the following values:
 * 0 NO_ERROR
 * 387 ERROR_MOUSE_INV_PARMS
 * 393 ERROR_MOUSE_NO_DATA
 * 466 ERROR_MOU_DETACHED
 * 501 ERROR_MOUSE_NO_CONSOLE

Sample

 * 1) define INCL_MOU
 * 2) include 

PMOUENVENTINFO   EventMask;     /*  Pointer to the mouse-event queue. */ PULONG           Wait;          /*  Wait flag. */ HMOU             DeviceHandle;  /*  Reserved. Must be 0. */ APIRET           rc;            /*  Return code. */

rc = MouReadEventQue(EventMask, Wait, DeviceHandle); 

Remarks
The types of queued events are directly affected by the current value of the event mark. MouSetEventMask is used to indicate the types of events desired, and MouGetEventMask is used to query the current value of the mask. Refer to these functions for more information about the masking of events.