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.
VioGetBuf (1.2)
◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_VIO
USHORT VioGetBuf(pulLVB, pcbLVB, hvio)
PULONG pulLVB; /* pointer to variable for address of LVB */
PUSHORT pcbLVB; /* pointer to variable for length of LVB */
HVIO hvio; /* video handle */
The VioGetBuf function retrieves the address of the logical video buffer
(LVB) that contains the current character attributes for the text output of
a process. The logical video buffer is available for text-mode screens
only.
A process can access and modify the contents of the logical video buffer at
any time, even if the process is in the background. Changes made to the
logical video buffer do not affect the physical screen until the process
calls the VioShowBuf function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pulLVB Points to the variable that receives the address of the logical
video buffer.
pcbLVB Points to the variable that specifies the length (in bytes) of
the logical video buffer. You can use the VioGetMode function to
determine the dimensions of the buffer.
hvio Identifies an advanced video-input-and-output (AVIO) presentation
space. For AVIO programs, this handle must have been created
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 the following:
ERROR_VIO_INVALID_HANDLE
Comments
If the process calling VioGetBuf is in the foreground, all VIO output calls
are written to both the physical display buffer and the logical video
buffer.
If the VioSetMode function is called following a call to VioGetBuf, the size
of the logical video buffer is adjusted to correspond to the new mode.
There is one logical video buffer per session (or presentation space, for an
AVIO application).
Example
This example calls VioGetBuf to retrieve the address of the logical video
buffer. It sets the character attributes in the buffer for foreground
blinking by using the OR operator to set the high bit, then it calls the
VioShowBuf function to display the character attributes.
PBYTE pbLVB;
USHORT cbLVB, i;
VioGetBuf((PULONG) &pbLVB, &cbLVB, 0);
for (i = 0; i < cbLVB; i += 2)
/* OR in the high bit to make it a blinking attribute */
*(pbLVB + i + 1) = *(pbLVB + i + 1) | 0x80;
VioShowBuf(0, cbLVB, 0); /* displays buffer */
See Also
VioGetMode, VioGetPhysBuf, VioShowBuf
♦