Share via


Printer Driver Architecture

The port monitor manages all communication between printer drivers and physical communication ports on a Windows CE–based platform. Therefore, the printer driver does not need to support different types of printer ports explicitly. The port monitor supports serial ports, infrared ports, parallel ports, and network printing. Printer drivers should call the port monitor APIs, instead of calling low-level communication APIs directly.

Port monitor APIs take handle-based parameters. This allows multiple applications to use the APIs simultaneously.

The following table shows the port monitor functions.

Function Description
GetPrinterInfo Retrieves information about the capabilities of a printer.
PrinterClose Closes a handle to a printer.
PrinterOpen Opens a handle to a printer.
PrinterSend Sends blocks of data to a printer.
ReportPrinterStatus Returns the status of a printer or printing operation that is in progress.

The following table shows the functions that printer drivers must implement.

Function Description
DrvCopyBits Translates between device-managed raster surfaces and graphics device interface (GDI) standard format bitmaps.
DrvDisablePDEV Used by MGDI to notify a driver that the specified PDEV structure is no longer needed.
DrvDisableSurface Used by the GDI to notify a driver that the surface created by the DrvEnableSurface function for the current device is no longer needed.
DrvEnableDriver Specifies the initial driver entry point exported by the driver DLL for devices that link directly to GWES, such as display drivers and printer drivers. It fills a DRVENABLEDATA structure with the driver version number and calling addresses of functions supported by the driver
DrvEnablePDEV Enables a device context for drawing and returns device metrics for the target printer or display device in a GDIINFO structure. Printer drivers call a display driver's DrvEnablePDEV function to create and initialize the device context, and then substitute the printer's device metrics before returning the device context to the GDI for bitmap rendering.
DrvEnableSurface Sets up a surface to be drawn on and associates it with a specified PDEV.
DrvEndDoc Called by the GDI to finish or abort a print job.
DrvGetModes Lists the modes supported by a specified device.
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.

See Also

Printer Drivers | Print Spooling | Printer Driver Samples | Printer Driver Registry Settings

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.