The DosReadMailslot API reads and then removes the next available message of a mailslot.
Messages are stored in a mailslot based on their priority (0-9). An incoming message with a higher priority might be stored ahead of a previously stored message with the same or lower priority.
Restrictions
#include <netcons.h> #include <mailslot.h> DosReadMailslot(mailslothandle, buf, pusBytesReturned, nextsize, nextpriority, timeout); /* 16 bit */ Dos32ReadMailslot(mailslothandle, buf, pulBytesReturned, nextsize, nextpriority, timeout); /* 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_HANDL│ 6 │ The specified handle is not valid. │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ ERROR_INTERRUPT │ 95 │ A system call has been interrupted. │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ ERROR_BROKEN_PIPE │ 109 │ Write on pipe that is not being read.
│
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ ERROR_SEM_TIMEOUT │ 121 │ A timeout happened from the semaphore API
func- │
│ │ │ tions. │
└────────────────────┴───────┴─────────────────────────────────────────────────┘
Other codes could be returned by the DosSemRequest function.
For information about: