DEVESC_GETAPERTURE
Appearance
GreEscape DEVESC_GETAPERTURE
- 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_GETAPERTURE returns the size and physical address of the video aperture. For example, it would return "0A000h" and "64KB" for most Super VGA adapters. Care must be taken to determine if VGA emulation is active. If it is, a nonconflicting aperture is returned for the aperture address.
When multiple video adapters are present, this call returns the information for the adapter in use by the Presentation Manager for displaying the desktop.
Syntax
GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);
Parameters
- hdc (HDC) - input
- Device context handle.
- lCode (LONG) - input
- DEVESC_GETAPERTURE escape code.
- lInCount (LONG) - input
- The handling routine should ignore this parameter.
- pbInData (PBYTE) - input
- The handling routine should ignore this parameter.
- plOutCount (PLONG) - input
- Number of bytes pointed to by pOutData.
- pbOutData (PLONG) - input
- Pointer to an APERTURE structure containing:
- ulPhysAddr The physical address of the video memory aperture that the calling routine should use.
- ulApertureSize The size in bytes of the video memory aperture.
- ulScanLineSize The offset in VRAM between scan lines.
- This value tells the caller how many bytes of VRAM (not visible memory) are used for each scan line. For example, an 800-byte visible scan line could be mapped onto a 1024-byte physical scan line.
- rctlScreen A rectangle describing the visible region of VRAM.
- For example, a 640 x 480 screen would normally return an upper-left corner of (0,0) and a lower-right corner of (639,479).
Returns
- rc (LONG) - returns
- Return Code.
- The handling routine returns:
- DEV_OK
-
- Successful
- DEVESC_NOTIMPLEMENTED
-
- Escape is not implemented for the specified code
- DEVESC_ERROR
-
- Error
Sample Source Code
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG lCode; /* DEVESC_GETAPERTURE escape code. */ LONG lInCount; /* The handling routine should ignore this parameter. */ PBYTE pbInData; /* The handling routine should ignore this parameter. */ PLONG plOutCount; /* Number of bytes pointed to by pOutData. */ PLONG pbOutData; LONG rc; /* Return Code. */ rc = GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData);