***FW from microsoft.public.ddk.win2000.printer.video

Hi All

I am developing a PostScript printer driver by modifying WindowsXP ddk
samples "Windows 2000 OEM UI Customization Sample (PS)", and encounterring
a problem on updating dmDuplex member of public DEVMODE.
It's very weird:
1. On original sample, system standard "Layout" and "Color" sheet is
hidden, if I don't hide the 2 sheets(directly return E_NOTIMPL in IOemUI2::HideStandardUI()),
then dmDuplex can be updated normally.
2. The problem is not reproduced on updating other public DEVMODE
members, such as dmOrientation, dmCopies, dmPaperSize and dmScale.

I was not using CPSUI to make my plugin property sheets, so I cannot use
DrvUpdateUISetting() to update user settings. Below is the testing code
I am using to update public and private DEVMODE under reason of
PROPSHEETUI_REASON_DESTROY on hrOEMDocumentPropertySheets(PPROPSHEETUI_INFO
pPSUIInfo, ...):
...
POEMUIPSPARAM pOEMUIParam;
PDEVMODE pTestDevmode;
pOEMUIParam = (POEMUIPSPARAM)pPSUIInfo->lParamInit;
pTestDevmode = (PDEVMODE) pOEMUIParam->pPublicDM;
//check value of pTestDevmode->dmDuplex at here: it is 1.
pTestDevmode->dmDuplex = 2;
pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet,
CPSFUNC_SET_RESULT,
(LPARAM)NULL,
(LPARAM)CPSUI_OK);
//check value of pTestDevmode->dmDuplex at here:
// it is 1 if Layout and Color sheet is hidden. <-- Problem!
// it is 2 if Layout and Color sheet is not hidden. <-- Expected
...

I will be appreciated if anyone can give me any advice on this.