## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreRestoreRegion - Parameters

hdc (HDC) - input Device context handle.

cSave (LONG) - input DC save level.

Indicates the saved DC state, which the handling routine uses to restore the region. When this is passed as -1, the handling routine resets the region to its initial state (-1 is passed to this routine from GreResetDC and is the only valid negative value). A value of 0 indicates that the region is restored to its initial state. Other positive values identify which saved level is restored. See RestoreDCState.

pInstance (PVOID) - input Pointer to instance data.

lFunction (ULONG) - input High-order WORD=flags; low-order WORD= NGreRestoreRegion.

fSuccess (BOOL) - returns Return codes.

This function returns BOOLEAN (fSuccess).

TRUE Successful
FALSE Error

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_HDC_BUSY
PMERR_INSUFFICIENT_MEMORY
PMERR_INV_COORDINATE
PMERR_INV_HDC
PMERR_INV_HRGN
PMERR_INV_RECT
PMERR_INV_REGION_CONTROL

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.