You can obtain information
on mailbox characteristics by using the Get Device/Volume Information ($GETDVI)
system service. (Refer to the HP OpenVMS System Services Reference Manual.)
$GETDVI returns mailbox characteristics when you specify the
item code DVI$_DEVCHAR.
Mailbox Characteristics lists these
characteristics, which are defined by the $DEVDEF macro.
DVI$_DEVCLASS and DVI$_DEVTYPE return the device class and
device type names, which are defined by the $DCDEF macro. The device
class for mailboxes is DC$_MAILBOX. The device type is DT$_MBX (or DT$_SHRMBX
if the mailbox is a shared memory mailbox). DVI$_DEVBUFSIZ returns
the buffer size, which is the maximum message size in bytes.
DVI$_DEVDEPEND returns a longword field in which the two low-order
bytes contain the number of messages in the mailbox. (The two high-order
bytes are not used and should be ignored.)
DVI$_UNIT returns the mailbox unit number. Using mailbox to
hold a termination message for a subprocess or a detached process
requires that the parent process obtain this number to pass to the mbxunt argument of the $CREPRC system
service.