Jump to content

VioGetBuf: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Returns the address of the logical video buffer (LVB).  
Returns the address of the logical video buffer (LVB).


==Syntax==
==Syntax==
<PRE>
  VioGetBuf(LVBPtr, Length, VioHandle)
#define INCL_VIO
#include <os2.h>
 
PULONG    LVBPtr;    /*  Pointer to the logical video buffer address. */
PULONG    Length;    /*  Pointer to the length of the buffer, in bytes. */
HVIO      VioHandle;  /*  Presentation-space handle. */
APIRET    rc;        /* Return code. */
 
rc = VioGetBuf(LVBPtr, Length, VioHandle);
</PRE>


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


==Remarks==
==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.
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.
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.
[[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.  
If [[VioSetMode]] is issued following a VioGetBuf call, the size of the LVB is changed, and VioGetBuf must be reissued.


[[Category:Vio]]
[[Category:Vio]]

Latest revision as of 18:50, 1 January 2020

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.