Functions Implemented by Printer Drivers

The following table shows the functions that Windows CE–based printer drivers must implement.

Function
Description
DrvCopyBits Called by the GDI to copy a rendered band to the printer driver. During the call to the DrvEnablePDEV function, the printer driver specifies the bitmap format used in the call to this function.
DrvDisablePDEV Frees memory and resources used by the driver when the printer device context (DC) is no longer needed.
DrvDisableSurface Called by the GDI to inform the printer driver that the surface created for the current printing DC is no longer needed.
DrvEnableDriver Receives two callback function pointers from the GDI and returns GDI function pointers for the other entry points implemented by the printer driver. This function is the entry point for the printer driver DLL, which must be exported in the .def file for the DLL.
DrvEnablePdev Used by the GDI to gather device metrics for the target printer. The printer driver returns device specifics in the GDIINFO structure.
DrvEnableSurface Creates a surface for use in rendering by calling the EngCreateDeviceSurface function.
DrvEndDoc Called by the GDI to finish or abort a print job.
DrvGetModes Returns information to the GDI about the default printing mode supported by the printer driver. The printer driver returns the default configuration in the DEVMODE structure.
DrvStartDoc Called by the GDI to start a print job.
DrvStartPage Called by the GDI to start printing the next page of a print job.