Jump to content

DEVESC_REGISTER

From EDM2

GreEscape DEVESC_REGISTER is called by EnDIVE users to register and unregister use with the driver.

Simulation support
None.

Syntax

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

Parameters

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

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
WINGETLASTERROR can be called for specific error information.

Remarks

This function allows each calling process to be uniquely identified by the handle returned on a register operation.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

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

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