Table of Contents

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

DosPutMessage

This call outputs the message in a buffer passed by a caller to the specified handle. The function formats the buffer to prevent words from wrapping if displayed to a screen.

Syntax

DosPutMessage (FileHandle, MessageLength, MessageBuffer) 

Parameters

Return Code

rc (USHORT) - return

Return code descriptions are:

Remarks

Screen width is assumed to be 80 characters. The DosPutMessage call counts a CR/LF in the 80 characters that it tries to write to the screen. If a word extends past column 78, it is put on the next line. DosPutMessage assumes the starting cursor position is column one when handling a word wrap.

If the last character to be positioned on a line is a double-byte character that would be bisected, the rule above ensures that the character is not bisected.

Example Code

C Binding

#define INCL_DOSMISC
 
USHORT  rc = DosPutMessage(FileHandle, MessageLength, MessageBuffer);
 
USHORT  FileHandle;    /* Handle of output file/device */
USHORT  MessageLength; /* Length of message buffer */
PCHAR   MessageBuffer; /* Message buffer */
 
USHORT  rc;            /* return code */

MASM Binding

EXTRN  DosPutMessage:FAR
INCL_DOSMISC      EQU 1
 
PUSH   WORD    FileHandle    ;Handle of output file/device
PUSH   WORD    MessageLength ;Length of message buffer
PUSH@  OTHER   MessageBuffer ;Message buffer
CALL   DosPutMessage

Returns WORD

Note

Text based on http://www.edm2.com/index.php/DosPutMessage_(FAPI)