Table of Contents

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

VioGetBuf

This call returns the address of the logical video buffer (LVB).

Syntax

 VioGetBuf (LVBPtr, Length, VioHandle)

Parameters

Return Code

rc (USHORT) - return

Return code descriptions are:

Remarks

An application using VioGetBuf can prepare a screen in the application's own logical video buffer (LVB) offline. When the application is in the foreground, the physical screen buffer is updated from the LVB when VioShowBuf is issued. When the application runs in the background, the physical screen buffer is updated when the application is switched to the foreground.

Once VioGetBuf is issued, all VioWrtXX calls issued while the application is running in the foreground are written to the physical display buffer and LVB. If a VioGetPhysBuf is subsequently issued, then the VioWrtXX calls are only written to the physical display buffer. They are no longer written to the LVB.

VioGetMode may be used to determine the dimensions of the buffer.

If VioSetMode is issued following a VioGetBuf call, 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 if AVIO application) that corresponds to the current mode on the current display configuration.

PM Considerations

This function returns the address and length of the Advanced VIO presentation space. The presentation space may be used to directly manipulate displayed information.

Bindings

C Binding

#define INCL_VIO
 
USHORT  rc = VioGetBuf(LVBPtr, Length, VioHandle);
 
PULONG           LVBPtr;        /* Points to LVB */
PUSHORT          Length;        /* Length of buffer */
HVIO             VioHandle;     /* Vio handle */
 
USHORT           rc;            /* return code */

MASM Binding

EXTRN  VioGetBuf:FAR
INCL_VIO            EQU 1
 
PUSH@  DWORD   LVBPtr        ;Points to LVB
PUSH@  WORD    Length        ;Length of buffer
PUSH   WORD    VioHandle     ;Vio handle
CALL   VioGetBuf
 
Returns WORD

Note

Text based on http://www.edm2.com/index.php/VioGetBuf_(FAPI)