Hi.
I am developing a printer driver which prints any document to an image
file.
I am using Unidrv.dll and Win2000 DDK sample Oemui.dll. There is one
more
component, rendering plug-in. I added a new property sheet page and a
option
item using a method in Oemui.dll like below.

// source code //

HRESULT hrOEMDocumentPropertySheets(PPROPSHEETUI_INFO pPSUIInfo,
LPARAM lParam,
IPrintOemDriverUI* pOEMHelp)
{
LONG_PTR lResult;

............

// Do action.
switch(pPSUIInfo->Reason)
{
case PROPSHEETUI_REASON_INIT:
{
DWORD dwSheets = 0;
PCBUSERDATA pUserData;
POEMUIPSPARAM pOEMUIParam = (POEMUIPSPARAM)
pPSUIInfo->lParamInit;
HANDLE hHeap = pOEMUIParam->hOEMHeap;
POEMDEV pOEMDev = (POEMDEV)
pOEMUIParam->pOEMDM;
COMPROPSHEETUI Sheet;
DLGPAGE PageProp;

// Init property page.
memset(&Sheet, 0, sizeof(COMPROPSHEETUI));
Sheet.cbSize = sizeof(COMPROPSHEETUI);
Sheet.Flags = CPSUIF_UPDATE_PERMISSION;
Sheet.hInstCaller = ghInstance;
Sheet.pCallerName = GetStringResource(hHeap,
ghInstance, IDS_NAME);
Sheet.pHelpFile = NULL;
Sheet.pfnCallBack = OEMDocUICallBack;
Sheet.pDlgPage = CPSUI_PDLGPAGE_ADVDOCPROP;
Sheet.cOptItem = 1;
Sheet.IconID = IDI_CPSUI_PRINTER;
Sheet.pOptItemName = GetStringResource(hHeap,
ghInstance, IDS_SECTION);
Sheet.CallerVersion = 0x100;
Sheet.OptItemVersion = 0x100;

// Init user data.
pUserData = (PCBUSERDATA) HeapAlloc(hHeap,
HEAP_ZERO_MEMORY, sizeof(CBUSERDATA));
pUserData->hComPropSheet = pPSUIInfo->hComPropSheet;
pUserData->pfnComPropSheet =
pPSUIInfo->pfnComPropSheet;
pUserData->pOEMUIParam = pOEMUIParam;
Sheet.UserData = (ULONG_PTR) pUserData;

// Create OptItems for page.
Sheet.pOptItem = CreateOptItems(hHeap,
Sheet.cOptItem);

// Initialize OptItems
Sheet.pOptItem[0].cbSize = sizeof(OPTITEM);
Sheet.pOptItem[0].Level = 1;
Sheet.pOptItem[0].Flags = OPTIF_COLLAPSE;
Sheet.pOptItem[0].pName = GetStringResource(hHeap,
ghInstance, IDS_SECTION);
Sheet.pOptItem[0].Sel = pOEMDev->dwDriverData;

Sheet.pOptItem[0].pOptType = CreateOptType(hHeap, 3);

Sheet.pOptItem[0].pOptType->Type = TVOT_3STATES;
Sheet.pOptItem[0].pOptType->pOptParam[0].pData =
GetStringResource(hHeap, ghInstance, IDS_TIF);
Sheet.pOptItem[0].pOptType->pOptParam[1].pData =
GetStringResource(hHeap, ghInstance, IDS_JPG);
Sheet.pOptItem[0].pOptType->pOptParam[2].pData =
GetStringResource(hHeap, ghInstance, IDS_BMP);

Sheet.pOptItem[0].pOptType->pOptParam[0].IconID = IDS_TIF;
Sheet.pOptItem[0].pOptType->pOptParam[1].IconID = IDS_JPG;
Sheet.pOptItem[0].pOptType->pOptParam[2].IconID = IDS_BMP;

Sheet.pOptItem[0].pOptType->Count = 3;

// Add property sheets.
lResult =
pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet,
CPSFUNC_ADD_PCOMPROPSHEETUI,
(LPARAM)&Sheet,
(LPARAM)&dwSheets);


}
break;

............

}

pPSUIInfo->Result = lResult;
return S_OK;
}


And it works well. There was a newly added property sheet page in
printing dialog.
I'd like to let the user select an output file format(bmp, tif, etc.)
through
the property sheet page(using TVOT_3STATES in above source code) and
add some
more option items in the same sheet page.
The problem is that I don't have any idea how I can get the results of
what user selected through the option items in the property sheet
page.
There are some answers to similar question but not enough to
understand
how and what.
I'd like to use the selected options in rendering plug-in module.
Does anyone know the solution to this question? If possible, please
show me some sample source codes. Or explain in detail.

Thanks in advance.