Jump to content

DEVESC_DEACQUIREFB

From EDM2
Revision as of 23:21, 11 July 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DEVESC_DEACQUIREFB}} GreEscape DEVESC_DEACQUIREFB releases the internal Presentation Manager driver resources acquired by DEVESC_ACQUIREFB. ;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. ==Syntax== GreEscape(hdc, lCode, lInCount, pbInData, plOutCount, pbOutData); ==Parameters== ;''hdc'' (HDC) - input: Device contex...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GreEscape DEVESC_DEACQUIREFB releases the internal Presentation Manager driver resources acquired by DEVESC_ACQUIREFB.

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.

Syntax

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

Parameters

hdc (HDC) - input
Device context handle.
lCode (LONG) - input
DEVESC_DEACQUIREFB escape code.
lInCount (LONG) - input
The handling routine ignores this parameter.
pbInData (PBYTE) - input
The handling routine ignores this parameter.
plOutCount (PLONG) - input
The handling routine ignores this parameter.
pbOutData (PLONG) - input
The handling routine ignores this parameter.

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

Remarks

The escape results in the release of the video adapter device for use by other threads. The device drivers are informed that the process that reserved the adapter has completed its operation.

This function is used in conjunction with DEVESC_SWITCHBANK and DEVESC_ACQUIREFB. When used, the handling routine restores the state saved by DEVESC_ACQUIREFB and returns.

If DEVESC_ACQUIREFB had caused the mouse cursor to be hidden, this call will perform "unexclude" processing to restore the mouse cursor.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /* Device context handle. */
LONG     lCode;       /* DEVESC_DEACQUIREFB escape code. */
LONG     lInCount;    /* The handling routine ignores this parameter. */
PBYTE    pbInData;    /* The handling routine ignores this parameter. */
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);