Required Printer Interface Driver Functions

A printer interface driver must implement the following functions:

DevQueryPrintEx Determines whether or not the driver can print the specified job on a printer.
DrvConvertDevMode Converts the specified DEVMODE.
DrvDeviceCapabilities Provides information about the specified device and its capabilities.
DrvDevicePropertySheets Adds the driver’s printer properties page(s) to the specified property sheet.
DrvDocumentPropertySheets Adds the driver’s document properties page(s) to the specified property sheet.
DrvPrinterEvent Responds to the print subsystem’s request for action in response to an event that the subsystem has received.

DrvDocumentPropertySheets is called when a user has requested that a printer’s document properties be updated and/or displayed.

When DrvDocumentPropertySheets is called with a null pPSUIInfo parameter, the spooler is the caller. A user interface is not required in this situation; instead, DrvDocumentPropertySheets should perform the spooler-requested operation that is specified in the fMode member of the DOCUMENTPROPERTYHEADER structure.

When DrvDocumentPropertySheets is called with a non-null pPSUIInfo parameter, the Common Property Sheet User Interface is the caller. The printer interface driver has the option of supplying the CPSUI with driver-specific document property page(s) for display on the CPSUI-managed property sheet. See the Common Property Sheet User Interface for more details.

The Print Folder calls DrvDevicePropertySheets when a user has requested to see the Printer Properties property sheet. The printer interface driver has the option of supplying the CPSUI with a property sheet page that displays and permits configuration of device-specific properties.

Because virtually all printer drivers have registry data, the printer interface driver must implement the PRINT_EVENT_INITIALIZE event for DrvPrinterEvent. All other events can be optionally implemented.