Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DosPutMessage (1.2)
◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSMISC
USHORT DosPutMessage(hf, cbMsg, pchMsg)
HFILE hf; /* handle of output file/device */
USHORT cbMsg; /* length of message buffer */
PCHAR pchMsg; /* pointer to message buffer */
The DosPutMessage function writes the message pointed to by the pchMsg
parameter to the file identified by the hf parameter.
The DosPutMessage function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hf Identifies the file that receives the message. This handle must
have been created previously by using the DosOpen function.
Standard file handles (such as 1 and 2) can also be used.
cbMsg Specifies the length (in bytes) of the message to output.
pchMsg Points to the message to output.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
ERROR_INVALID_HANDLE
ERROR_MR_UN_PERFORM
ERROR_WRITE_PROTECT
Comments
The DosPutMessage function uses an 80-column screen width. If a word is
about to span column 80, the function "wraps" the word to a new line at
column 1. If the last character to be positioned on a line is a double-byte
character that would be bisected, this rule ensures that the character is
not bisected.
When handling word wrapping, the DosPutMessage function uses column 1 as the
starting position of the cursor.
Restrictions
In real mode, the following restriction applies to the DosPutMessage
function:
♦ There is no method of identifying the boot drive. The system assumes that
the message file is in the root directory of the current drive.
See Also
DosGetMessage, DosInsMessage, DosOpen
♦