Jump to content

GreResurrection

From EDM2
Revision as of 18:34, 7 February 2020 by Martini (talk | contribs) (Created page with "GreResurrection reverses the condition set by GreDeath and restores the screen to the Presentation Manager interface. ; Simulation support: This function is mandatory for di...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GreResurrection reverses the condition set by GreDeath and restores the screen to the Presentation Manager interface.

Simulation support
This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

 GreResurrection(hdc, cbVmem, pReserved, pInstance, lFunction);

Parameters

hdc (HDC) - input
The device context handle.
cbVmem (LONG) - input
The number of bytes of video memory that have been damaged (determined by the VIO). The display driver can use this value to determine whether any of its video memory has been destroyed by the application. Some display drivers can ignore this parameter.
pReserved (PULONG) - input
A reserved pointer. Must be zero.
pInstance (PVOID) - input
A pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreResurrection.

Return Code

lResult (LONG) - returns
Return codes.
On completion, the handling routine must return a LONG value (lResult):
  • 0 Error.
  • 1 The screen has been successfully redrawn.
  • 2 The screen has not been completely redrawn; further action is required from the application.
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
  • PMERR_DEV_FUNC_NOT_INSTALLED
  • PMERR_INV_HDC

Remarks

Presentation Manager applications are set to the foreground. The presentation driver is enabled to update the screen for subsequent drawing calls.

This function goes directly to the Presentation Driver interface.

Declaration

#define INCL_GRE_DEVMISC3
#include <os2.h>

HDC       hdc;        /*  The device context handle. */
LONG      cbVmem;
PULONG    pReserved;  /*  A reserved pointer. Must be zero. */
PVOID     pInstance;  /*  A pointer to instance data. */
ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreResurrection. */
LONG      lResult;    /*  Return codes. */

lResult = GreResurrection(hdc, cbVmem, pReserved, pInstance, lFunction);