[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here 4.2 Mailbox Driver Device Information
HP OpenVMS I/O User’s Reference Manual: OpenVMS Version 8.4 > Chapter 4 Mailbox Driver

4.2 Mailbox Driver Device Information

You can obtain information on mailbox characteristics by using the Get Device/Volume Information ($GETDVI) system service. (See the HP OpenVMS System Services Reference Manual.)

$GETDVI returns mailbox characteristics when you specify the item code DVI$_DEVCHAR. Table 4-1 lists these characteristics, which are defined by the $DEVDEF macro.

Table 4-1 Mailbox Characteristics

Characteristic[1]Meaning
 Dynamic Bits (Conditionally Set)

DEV$M_SHR

Device is shareable.

DEV$M_AVL

Device is available.

 Static Bits (Always Set)

DEV$M_REC

Device is record-oriented.

DEV$M_IDV

Device is capable of input.

DEV$M_ODV

Device is capable of output.

DEV$M_MBX

Device is a mailbox.

[1] 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.) This information can also be obtained through the Get Mailbox Information function (see “Get Mailbox Information”).

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.