Examines a queue element without removing it from the queue.

#define INCL_DOSQUEUES
#include <os2.h>

HQUEUE          hq;         /*  The handle of the queue from which an element is to be examined. */
PREQUESTDATA    pRequest;   /*   A pointer to the REQUESTDATA in which PID and event codes are returned. */
PULONG          pcbData;    /*  A pointer to the length of the examined data. */
PPVOID          ppbuf;      /*  A pointer to the address of the element that is to be examined. */
PULONG          element;    /*  A pointer to an indicator that specifies whether to start at the beginning of the queue or at a particular element. */
BOOL32          nowait;     /*  The action to be performed when there are no elements in the queue. */
PBYTE           ppriority;  /*  A pointer to the element's priority value. */
HEV             hsem;       /*  The handle of an event semaphore that is to be posted when the data is added to the queue and nowait is set to 1. */
APIRET          ulrc;       /*  Return Code. */

ulrc = DosPeekQueue(hq, pRequest, pcbData,
         ppbuf, element, nowait, ppriority,
         hsem);


[Back] [Next]