subcalls.hlp (Topic list)
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.
VioReadCellStr (1.2)
Overview  Changes                                 Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_VIO
 
USHORT VioReadCellStr(pchCellString, pcb, usRow, usColumn, hvio)
PCH pchCellString;    /* pointer to buffer for string          */
PUSHORT pcb;          /* pointer to variable for string length */
USHORT usRow;         /* starting location (row)               */
USHORT usColumn;      /* starting location (column)            */
HVIO hvio;            /* video handle                          */
 
The VioReadCellStr function reads one or more cells (character-attribute
combinations) from the screen, starting at the specified location. If the
string is longer than the current line, the function continues reading at
the beginning of the next line but does not read past the end of the
screen.
 
The VioReadCellStr function is a family API function.
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
 
pchCellString  Points to the buffer that receives the cell string.
 
pcb            Points to a variable. When this function is called, the
               variable specifies the length (in bytes) of the buffer
               pointed to by pchCellString. The length should be an even
               number. When the function returns, this variable contains the
               length of the cell string copied to the pchCellString
               buffer.
 
usRow          Specifies the row at which to begin reading the cell string.
 
usColumn       Specifies the column at which to begin reading the cell
               string.
 
hvio           Identifies an advanced video-input-and-output (AVIO)
               presentation space. For AVIO programs, this handle must have
               been created previously using the VioCreatePS function. For
               other programs, hvio must be NULL.
 
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_VIO_COL
     ERROR_VIO_INVALID_HANDLE
     ERROR_VIO_ROW
 
Example
 
This example calls VioReadCellStr to read Line 0, then calls the
VioWrtCellStr function to write the cell string to Line 24.
 
CHAR achCells[160];
USHORT cb = sizeof(achCells);
VioReadCellStr(achCells,   /* buffer for string                     */
    &cb,                   /* points to variable for string length  */
    0,                     /* starting location (row)               */
    0,                     /* starting location (column)            */
    0);                    /* video handle                          */
VioWrtCellStr(achCells, cb, 24, 0, 0);
 
See Also
 
VioReadCharStr, VioWrtCellStr