Examines the data in a named pipe without removing it.
#define INCL_DOSNMPIPES
#include <os2.h>
HPIPE hpipe; /* The named-pipe handle to examine. */
PVOID pBuf; /* A pointer to the output buffer. */
ULONG cbBuf; /* The number of bytes to be read. */
PULONG pcbActual; /* A pointer a ULONG in which the number of bytes that were read is returned. */
PAVAILDATA pAvail; /* A pointer to the AVAILDATA in which the number of bytes that were available is returned. */
PULONG pState; /* A pointer to the ULONG in which the state of the named pipe is returned. */
APIRET ulrc; /* Return Code. */
ulrc = DosPeekNPipe(hpipe, pBuf, cbBuf, pcbActual,
pAvail, pState);