Difference between revisions of "VioReadCharStr"

From EDM2
Jump to: navigation, search
m
Line 1: Line 1:
==Description==
 
 
Reads a string of characters from the display, starting at the specified location.
 
Reads a string of characters from the display, starting at the specified location.
  
 
==Syntax==
 
==Syntax==
<PRE>
+
rc = VioReadCharStr(CharStr, Length, Row, Column, VioHandle);
#define INCL_VIO
+
#include <os2.h>
+
  
PCH      CharStr;    /*  Character buffer. */
 
PULONG    Length;    /*  Length of buffer. */
 
ULONG    Row;        /*  Starting row location. */
 
ULONG    Column;    /*  Starting column location. */
 
HVIO      VioHandle;  /*  Vio presentation-space handle. */
 
APIRET    rc;        /*  Return code. */
 
 
rc = VioReadCharStr(CharStr, Length, Row, Column, VioHandle);
 
 
</PRE>
 
 
==Parameters==
 
==Parameters==
; CharStr (PCH) - output : Character buffer.
+
;CharStr (PCH) - output : Character buffer.
Address of the buffer where the character string is returned.  
+
:Address of the buffer where the character string is returned.
 
+
;Length (PULONG) - in/out : Length of buffer.
; Length (PULONG) - in/out : Length of buffer.
+
:Address of the buffer length in bytes.
Address of the buffer length in bytes.  
+
;Row (ULONG) - input : Starting row location.
 
+
:Starting row of the field to read, where 0 is the top row.
; Row (ULONG) - input : Starting row location.
+
Starting row of the field to read, where 0 is the top row.  
+
 
+
 
; Column (ULONG) - input : Starting column location.
 
; Column (ULONG) - input : Starting column location.
Starting column of the field to read, where 0 is the leftmost column.  
+
:Starting column of the field to read, where 0 is the leftmost column.
 
+
;VioHandle (HVIO) - input : Vio presentation-space handle.
; VioHandle (HVIO) - input : Vio presentation-space handle.
+
:This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.  
This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.  
+
  
 
==Return Code==
 
==Return Code==
 
  rc (APIRET) - returns
 
  rc (APIRET) - returns
 
 
VioReadCharStr returns one of the following values:
 
VioReadCharStr returns one of the following values:
 
+
* 0   NO_ERROR
* 0         NO_ERROR  
+
* 355 ERROR_VIO_MODE  
* 355       ERROR_VIO_MODE  
+
* 358 ERROR_VIO_ROW  
* 358       ERROR_VIO_ROW  
+
* 359 ERROR_VIO_COL  
* 359       ERROR_VIO_COL  
+
* 421 ERROR_VIO_INVALID_PARMS  
* 421       ERROR_VIO_INVALID_PARMS  
+
* 436 ERROR_VIO_INVALID_HANDLE
* 436       ERROR_VIO_INVALID_HANDLE
+
  
 
==Remarks==
 
==Remarks==
If a string read comes to the end of the line and is not complete, it continues at the beginning of the next line. If the read comes to the end of the screen and is not complete, it terminates, and the length is set to the number of characters read.  
+
If a string read comes to the end of the line and is not complete, it continues at the beginning of the next line. If the read comes to the end of the screen and is not complete, it terminates, and the length is set to the number of characters read.
 
+
==Example Code==
+
<PRE>
+
 
+
</PRE>
+
==Related Functions==
+
* [[OS2 API:CPI:
+
 
+
  
[[Category:The OS/2 API Project]]
+
[[Category:Vio]]

Revision as of 19:19, 27 January 2017

Reads a string of characters from the display, starting at the specified location.

Syntax

rc = VioReadCharStr(CharStr, Length, Row, Column, VioHandle);

Parameters

CharStr (PCH) - output 
Character buffer.
Address of the buffer where the character string is returned.
Length (PULONG) - in/out 
Length of buffer.
Address of the buffer length in bytes.
Row (ULONG) - input 
Starting row location.
Starting row of the field to read, where 0 is the top row.
Column (ULONG) - input 
Starting column location.
Starting column of the field to read, where 0 is the leftmost column.
VioHandle (HVIO) - input 
Vio presentation-space handle.
This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.

Return Code

rc (APIRET) - returns

VioReadCharStr returns one of the following values:

  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 358 ERROR_VIO_ROW
  • 359 ERROR_VIO_COL
  • 421 ERROR_VIO_INVALID_PARMS
  • 436 ERROR_VIO_INVALID_HANDLE

Remarks

If a string read comes to the end of the line and is not complete, it continues at the beginning of the next line. If the read comes to the end of the screen and is not complete, it terminates, and the length is set to the number of characters read.