SaveDCState
Appearance
OS2_PM_DRV_ENABLE: SaveDCState requests the presentation driver to save all the information that it has about the device context.
Syntax
SaveDCState(ulSubfunction, pParam1, pParam2)
Parameters
- ulSubfunction (ULONG) - input
- 07h.
- pParam1 (PULONG) - input
- A pointer (pInstance) to the DC instance data.
- pParam2 (PLONG) - input
- Not used.
Return Code
- rc (LONG) - returns
- Return codes.
- The handling routine should return a LONG integer. Valid values are:
- 0 Successful
- -1 Error
Remarks
The state of a DC might be saved multiple times in last-in-first-out (LIFO) order. The routine returns an error code if there is not enough memory available to save the state.
The handling routine must keep a count of the number of saved states.
RestoreDCState is related to SaveDCState.
Sample Code
#include <os2.h> ULONG ulSubfunction; /* 07h. */ PULONG pParam1; PLONG pParam2; /* Not used. */ LONG rc; /* Return codes. */ rc = SaveDCState(ulSubfunction, pParam1, pParam2);