The DosPeekMailslot API reads the next available message in a mailslot without removing it.
Note: If a higher-priority message arrives, there is no guarantee that a message previously read by the DosPeekMailslot API will be the same message read by a subsequent call to the DosReadMailslot API.
#include <netcons.h> #include <mailslot.h> DosPeekMailslot(mailslothandle, buf, pusBytesReturned, nextsize, nextpriority); /* 16 bit */ Dos32PeekMailslot(mailslothandle, buf, pulBytesReturned, nextsize, nextpriority); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
mailslothandle
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬────────────┬───────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE │MEANING │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_INVALID_HANDLE │ 6 │ The specified handle is not │
│ │ │ valid. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_BROKEN_PIPE │ 109 │ Write on pipe that is not being │
│ │ │ read. │
└─────────────────────────────┴────────────┴───────────────────────────────────┘
Other codes could be returned by the DosSemRequest function.
For information about: