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_ACQUIREFB reserves a video adapter by acquiring the necessary internal Presentation Manager driver resources so that the calling routine has sole access to the video frame buffer and bank-switching registers. No use of the adapter by the Presentation Manager or any other process is allowed while the adapter is reserved.
The escape is intended to allow the calling routine to access memory directly (causing bank switches as needed), without concern for another process changing the bank registers. The device drivers are alerted that the software motion video component is using the bank address switch DevEscape.
This escape is used in conjunction with DEVESC_SWITCHBANK and DEVESC_DEACQUIREFB. When used, the handling routine saves the necessary state to allow the calling routine to access video memory directly and use DEV_SWITCHBANK. After the calling routine completes its access of video memory it must use DEVESC_DEACQUIREFB to restore the adapter state, and allow other processes to access the adapter.
If the adapter cannot be acquired, the handling routine immediately responds with DEVESC_ERROR.
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG ICODE; /* DEVESC_ACQUIREFB escape code. */ LONG lInCount; /* Number of bytes pointed to by pInData. */ PBYTE pbInData; PLONG plOutCount; /* The handling routine ignores this parameter. */ PLONG pbOutData; /* The handling routine ignores this parameter. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, ICODE, lInCount, pbInData, plOutCount, pbOutData);