You declare messages using the DECLARE_MESSAGE and LONG_MESSAGE macros to specify the message text and identfiers, and by using the VxD_IMESSAGE_SEG, VxD_PMESSAGE_SEG, and VXD_MESSAGE_SEG macros to specify which data segment receives the message data. The following example shows how to declare messages for a VxD:
; Message table for initialization data segment VxD_IMESSAGE_SEG DECLARE_MESSAGE <MSG_BootErrorMsg>, \ <"Error interrupt conflict, please reinstall"> VxD_IMESSAGE_ENDS ; Messages table for locked data segment VxD_MESSAGE_SEG DECLARE_MESSAGE <MSG_DiskPlease>, \ <"Please reinsert the original disk."> DECLARE_MESSAGE <MSG_CantOpen>, \ <'Error: Can't open file "%0s" on drive "%1s".'> ; A long message LONG_MESSAGE_START <MSG_MyLongMessage> LONG_MESSAGE <"Messages too long to fit on one line "> LONG_MESSAGE <"can be divided among several lines.", 10, 13> LONG_MESSAGE <"You can include control characters, such as "> LONG_MESSAGE <"new line and carriage return", 10, 13> LONG_MESSAGE_END VxD_MESSAGE_ENDS
This example declares four messages. The MSG_BootErrorMsg, MSG_DiskPlease, and MSG_MyLongMessage messages are static messages. The MS_CantOpen message contains two parameter placeholders. The message macros automatically append a terminating null byte. Not illustrated is a pageable message segment, which uses the PMESSAGE type.
See also DECLARE_MESSAGE, LONG_MESSAGE, VXD_IMESSAGE_SEG, VXD_MESSAGE_SEG