SaveDCState: Difference between revisions
Appearance
Created page with "OS2_PM_DRV_ENABLE: SaveDCState requests the presentation driver to save all the information that it has about the device context. ==Syntax== SaveDCState(ulSubfunction, pPar..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
OS2_PM_DRV_ENABLE: SaveDCState requests the presentation driver to save all the information that it has about the device context. | OS2_PM_DRV_ENABLE: SaveDCState requests the presentation driver to save all the information that it has about the device context. | ||
==Syntax== | ==Syntax== | ||
SaveDCState(ulSubfunction, pParam1, pParam2) | SaveDCState(ulSubfunction, pParam1, pParam2) | ||
==Parameters== | ==Parameters== | ||
;ulSubfunction (ULONG) - input | ;ulSubfunction (ULONG) - input:07h. | ||
:07h. | ;pParam1 (PULONG) - input:A pointer (pInstance) to the DC instance data. | ||
;pParam2 (PLONG) - input:Not used. | |||
;pParam1 (PULONG) - input | |||
:A pointer (pInstance) to the DC instance data. | |||
;pParam2 (PLONG) - input | |||
:Not used. | |||
==Return Code== | ==Return Code== | ||
; rc (LONG) - returns | ; rc (LONG) - returns: Return codes. | ||
: Return codes. | : The handling routine should return a LONG integer. Valid values are: | ||
::0 Successful | |||
: The handling routine should return a LONG integer. Valid values are: | ::-1 Error | ||
: | |||
: | |||
==Remarks== | ==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 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. | The handling routine must keep a count of the number of saved states. | ||
RestoreDCState is related to SaveDCState. | [[RestoreDCState]] is related to SaveDCState. | ||
==Sample Code== | ==Sample Code== | ||
Line 34: | Line 26: | ||
#include <os2.h> | #include <os2.h> | ||
ULONG ulSubfunction; /* | ULONG ulSubfunction; /* 07h. */ | ||
PULONG pParam1; | PULONG pParam1; | ||
PLONG pParam2; /* | PLONG pParam2; /* Not used. */ | ||
LONG rc; /* | LONG rc; /* Return codes. */ | ||
rc = SaveDCState(ulSubfunction, pParam1, pParam2); | rc = SaveDCState(ulSubfunction, pParam1, pParam2); | ||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 12:40, 3 April 2025
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);