BOOL DrvResetPDEV (
DHPDEV dhpdevOld, | |
DHPDEV dhpdevNew | |
); |
DrvResetPDEV transfers the state of the driver from the old PDEV to the new PDEV when a Win32 application calls ResetDC.
Parameters
dhpdevOld
Identifies the original device PDEV.
dhpdevNew
Identifies the new device PDEV.
Return Value
This return value is TRUE if the function is successful. Otherwise it is FALSE, and an error code is logged.
Comments
This function can set a flag so that when DrvDisablePDEV is called, the page is not ejected in the case of double-sided printing. The new PDEV should also be marked so that DrvStartDoc on the new PDEV does not cause a new header to be downloaded, as in PostScript printing.
If the driver caches fonts that are transferable between the two modes, they should be transferred during this function.
If DrvStartDoc was called before ResetDC, the driver receives the following sequence of calls:
dhpdevNew = DrvEnablePDEV();
DrvResetPDEV(dhpdevOld, dhpdevNew);
DrvDisableSurface(dhpdevOld);
DrvDisablePDEV(dhpdevOld);
DrvEnableSurface(dhpdevNew);
DrvStartDoc(dhpdevNew);
If ResetDC is called between documents there is no surface associated with the PDEV, so only the following sequence of calls is made:
dhpdevNew = DrvEnablePDEV();
DrvResetPDEV(dhpdevOld,dhpdevNew);
DrvDisablePDEV(dhpdevOld);
If the same fonts can be used by both the old and new PDEVs, then the cached font data should be moved into the new PDEV at the time of this call. The font data associated with the original PDEV will disappear when the original PDEV is deleted.
Note that no surface has been created for the new PDEV when DrvResetPDEV is called.
DrvResetPDEV is required for output devices to allow mode changes in documents.
See Also
DrvDisablePDEV, DrvDisableSurface, DrvEnablePDEV, DrvEnableSurface, DrvStartDoc