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.
VioReadCharStr (1.2)
◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_VIO
USHORT VioReadCharStr(pchString, pcb, usRow, usColumn, hvio)
PCH pchString; /* pointer to buffer for string */
PUSHORT pcb; /* pointer to variable for length of buffer */
USHORT usRow; /* starting location (row) */
USHORT usColumn; /* starting location (column) */
HVIO hvio; /* video handle */
The VioReadCharStr function reads a character string from the screen,
starting at a specified location. If the character string is longer than the
current line, the function continues reading it at the beginning of the next
line but does not read past the end of the screen.
The VioReadCharStr function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pchString Points to the buffer that receives the character string.
pcb Points to a variable. When this function is called, the variable
specifies the length (in bytes) of the buffer pointed to by
pchString. When the function returns, this variable contains the
length of the string copied to the pchString buffer.
usRow Specifies the starting row of the character to be read.
usColumn Specifies the starting column of the character to be read.
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 VioReadCharStr to read a character string that is 80
characters long, starting at Row 1, Column 0 of the screen. It then calls
the VioWrtCharStr function to write the character string to Row 24, Column
0.
CHAR achString[80];
USHORT cb = sizeof(achString);
VioReadCharStr(achString, /* string buffer */
&cb, /* length of buffer */
1, /* row */
0, /* column */
0); /* video handle */
VioWrtCharStr(achString, cb, 24, 0, 0);
See Also
VioCreatePS, VioReadCellStr, VioWrtCharStr
♦