Jump to content

DEVESC_EXTGET

From EDM2

GreEscape DEVESC_EXTGET is called by EnDIVE users to copy an image from the screen to system memory or to off-screen video memory.

Simulation support
None.

Syntax

GreEscape(hdc, ICODE, lInCount, pbInData, plOutCount, pbOutData);

Parameters

hdc (HDC) - input
Device context handle.
ICODE (LONG) - input
DEVESC_EXTGET escape code.
lInCount (LONG) - input
Number of bytes pointed to by pbInData.
pbInData (PBYTE) - input
Pointer to IMAGEPACK data structure.
plOutCount (PLONG) - input
NULL.
pbOutData (PLONG) - input
NULL.

Returns

rc (LONG) - returns
Return Codes.
The handling routine returns:
DEV_OK
Successful
DEVESC_NOTIMPLEMENTED
Escape is not implemented for the specified code
DEVESC_ERROR
Error

Remarks

This function should be called only when the image needs to be returned in a compressed format. If the hardware does not support compression, then this call should not be implemented.

The various compression formats supported by the hardware are returned in the GreEscape DEVESC_EXTQUERY function.

Users of this function are responsible for bracketing access to video memory and this function with GreEscape DEVESC_HWREQUEST.

The GreEscape DEVESC_EXTPUT and GreEscape DEVESC_EXTQUERY functions are related to GreEscape DEVESC_EXTGET.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /* Device context handle. */
LONG     ICODE;       /* DEVESC_EXTGET escape code. */
LONG     lInCount;    /* Number of bytes pointed to by pbInData. */
PBYTE    pbInData;    /* Pointer to IMAGEPACK data structure. */
PLONG    plOutCount;  /* NULL. */
PLONG    pbOutData;   /* NULL. */
LONG     rc;          /* Return Codes. */

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