IPrintOemUI::DevicePropertySheets method

The IPrintOemUI::DevicePropertySheets method allows a user interface plug-in to append a new page to a printer device's printer property sheet.

Syntax

HRESULT DevicePropertySheets(
  PPROPSHEETUI_INFO pPSUIInfo,
  LPARAM            lParam
);

Parameters

pPSUIInfo

Caller-supplied pointer to a PROPSHEETUI_INFO structure.

lParam

Caller-supplied value that depends on the reason value in pPSUIInfo-->Reason. The reason value can be one of the following constants, which are defined in compstui.h. For more information about these constants, see the Remarks section and lParam parameter description in the PFNPROPSHEETUI function type.

PROPSHEETUI_REASON_DESTROY

PROPSHEETUI_REASON_GET_ICON

PROPSHEETUI_REASON_GET_INFO_HEADER

PROPSHEETUI_REASON_INIT

PROPSHEETUI_REASON_SET_RESULT

Return Value

The return value depends on the contents of PROPSHEETUI_INFO structure's Reason member. For more information, see the description of DrvDevicePropertySheets.

Remarks

A user interface plug-in's IPrintOemUI::DevicePropertySheets method performs the same types of operations as the DrvDevicePropertySheets function that is exported by user-mode printer interface DLLs. Both functions have the same input parameters.

If you provide a user interface plug-in, the IPrintOemUI::DevicePropertySheets method is called after the driver's DrvDevicePropertySheets function is called.

When IPrintOemUI::DevicePropertySheets is called, the lParamInit member of the PROPSHEETUI_INFO structure contains the address of an OEMUIPSPARAM structure.

If you implement this method, you typically also supply a _CPSUICALLBACK-typed callback function to handle user modifications. This callback function must call IPrintOemDriverUI::DrvUpdateUISetting to inform the driver when the value associated with a user interface setting has been modified, if the value is stored in the driver's DEVMODEW structure (instead of the plug-in's private DEVMODEW members) or in registry keys.

If IPrintOemUI::DevicePropertySheets methods are exported by multiple user interface plug-ins, the methods are called in the order that the plug-ins are specified for installation.

If one user interface plug-in supports several printer models, and if you only want the new page to be displayed for some of those models, the IPrintOemUI::DevicePropertySheets method should just provide a success return value, without actually adding the page, for the models not requiring the page.

For more information about creating and installing user interface plug-ins, see Customizing Microsoft's Printer Drivers.

Requirements

   
Target Platform Desktop
Header prcomoem.h (include Prcomoem.h)

See Also

DrvDevicePropertySheets

IPrintOemUI

IPrintOemUI::DocumentPropertySheets

PFNPROPSHEETUI