The DosWriteMailslot API writes a message to a particular mailslot.
To send a message to all computers on the primary domain that have a local mailslot with the same name, an application must pass the name parameter \\*\mailslot\name and the class parameter 2 to DosWriteMailslot.
Restrictions
Second-class messages must be 400 bytes or smaller when written to remote requesters; they can be any size when written to local computers or remote servers.
#include <netcons.h> #include <mailslot.h> DosWriteMailslot(pMailslotName, message, size, priority, class, timeout); /* 16 bit */ Dos32WriteMailslot(pMailslotName, message, size, priority, class, timeout); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
pMailslotName
For the name of a local mailslot, use the format \mailslot\name.
For a remote mailslot, use \\computername\mailslot\ name.
For all mailslots with the same name, but on different computers in the primary domain, use \\*\mailslot\ name.
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_PATH_NOT_FOUND │ 3 │ The path was not found. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_NOT_SUPPORTED │ 50 │ This request is not supported by │
│ │ │ the network. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is │
│ │ │ not valid. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_INTERRUPT │ 95 │ A system call has been inter- │
│ │ │ rupted. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_BROKEN_PIPE │ 109 │ Write on pipe that is not being │
│ │ │ read. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_BUFFER_OVERFLOW │ 111 │ The buffer passed
to the system │
│ │ │ call is too small to hold return │
│ │ │ data. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ ERROR_SEM_TIMEOUT │ 121 │ A timeout happened from the │
│ │ │ semaphore API functions. │
├─────────────────────────────┼────────────┼───────────────────────────────────┤
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has │
│ │ │ not been started. │
└─────────────────────────────┴────────────┴───────────────────────────────────┘
Other codes could be returned from the following functions:
For information about: