Simulation support:

This function is mandatory for display drivers supporting software motion video. For other drivers, it is simulated by a handling routine in the graphics engine.

Description

GreEscape DEVESC_SWITCHBANK changes which bank of video memory is mapped to the aperture that is returned by DEVESC_GETAPERTURE. The escape is intended to allow the calling routine to switch banks in a device-independent fashion, and then access video memory directly.

This escape must be bracketed by calls to DEVESC_ACQUIREFB and DEVESC_DEACQUIREFB. These calls ensure serial access to the bank-switching resources of the device.

Currently, this call will only be used on adapters configured with apertures smaller than the visible video memory. Adapters with adequately sized apertures do not require the calling routine to acquire and deacquire the device in order to share the bank-switching resource.

This call is required for adapters that have a 64KB aperture in the 256-color mode. An XGA adapter has a 64KB aperture mode and most Super VGA adapters also use a 64KB aperture.

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /*  Device context handle. */
LONG     lCode;       /*  DEVESC_SWITCHBANK escape code. */
LONG     lInCount;    /*  Number of bytes pointed to by pInData. */
PBYTE    pbInData;    /*  Pointer to a SWITCHBANK structure containing: */
PLONG    plOutCount;  /*  The handling routine ignores this parameter. */
PLONG    pbOutData;   /*  The handling routine ignores this parameter. */
LONG     rc;          /*  Return Code. */

rc = GreEscape(hdc, lCode, lInCount, pbInData,
       plOutCount, pbOutData);


[Back: GreEscape DEVESC_SWITCHBANK]
[Next: GreEscape DEVESC_SWITCHBANK Parameter - hdc]