en:docs:fapi:dosputmessage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosputmessage [2018/08/31 09:19] – created prokusheven:docs:fapi:dosputmessage [2021/09/17 06:37] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== 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. 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== +===== Syntax ===== 
- DosPutMessage (FileHandle, MessageLength, MessageBuffer) +<code c> 
 +DosPutMessage (FileHandle, MessageLength, MessageBuffer)  
 +</code>
  
-==Parameters== +===== Parameters ===== 
-;FileHandle (USHORT) - input : Handle of the output file or device. + 
-;MessageLength (USHORT) - input : Length of the message to be output. +  FileHandle ([[USHORT]]) - input : Handle of the output file or device. 
-;MessageBuffer (PCHAR) - input : Address of the buffer that contains the returned message.+  MessageLength ([[USHORT]]) - input : Length of the message to be output. 
 +  MessageBuffer ([[PCHAR]]) - input : Address of the buffer that contains the returned message. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0   NO_ERROR 
-* 6   ERROR_INVALID_HANDLE 
-* 19  ERROR_WRITE_PROTECT 
-* 321 ERROR_MR_UN_PERFORM 
  
-==Remarks==+  * 0   NO_ERROR 
 +  * 6   ERROR_INVALID_HANDLE 
 +  * 19  ERROR_WRITE_PROTECT 
 +  * 321 ERROR_MR_UN_PERFORM 
 + 
 +===== 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. 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. 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== +===== Example Code ===== 
-===C Binding=== + 
-<PRE>+==== C Binding ===
 + 
 +<code c>
 #define INCL_DOSMISC #define INCL_DOSMISC
  
Line 35: Line 47:
  
 USHORT  rc;            /* return code */ USHORT  rc;            /* return code */
-</PRE>+</code>
  
-===MASM Binding=== +==== MASM Binding ===
-<PRE>+ 
 +<code asm>
 EXTRN  DosPutMessage:FAR EXTRN  DosPutMessage:FAR
 INCL_DOSMISC      EQU 1 INCL_DOSMISC      EQU 1
Line 46: Line 59:
 PUSH@  OTHER   MessageBuffer ;Message buffer PUSH@  OTHER   MessageBuffer ;Message buffer
 CALL   DosPutMessage CALL   DosPutMessage
 +</code>
 Returns WORD Returns WORD
-</PRE> 
- 
- 
  
-====== Note ======+===== Note =====
  
 Text based on [[http://www.edm2.com/index.php/DosPutMessage_(FAPI)]] Text based on [[http://www.edm2.com/index.php/DosPutMessage_(FAPI)]]