VioGetBuf

From EDM2
Jump to: navigation, search

Returns the address of the logical video buffer (LVB).

Syntax

VioGetBuf(LVBPtr, Length, VioHandle)

Parameters

LVBPtr (PULONG) - output
Pointer to the logical video buffer address.
Length (PULONG) - output
Pointer to the length of the buffer, in bytes.
The length is the number of rows, times the number of columns, times the size of the cell.
VioHandle (HVIO) - input
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
VioGetBuf returns one of the following values:
  • 0 NO_ERROR
  • 355 ERROR_VIO_MODE
  • 421 ERROR_VIO_INVALID_PARMS
  • 430 ERROR_VIO_ILLEGAL_DURING_POPUP
  • 436 ERROR_VIO_INVALID_HANDLE

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.

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

If VioSetMode is issued following a VioGetBuf call, the size of the LVB is changed, and VioGetBuf must be reissued.