Creating a Printer Driver

Printer drivers are just one component of the Windows 95 printer subsystem. The architecture of the Windows 95 printer subsystem is best shown as a scenario in which each printer subsystem component contributes to moving a print job started by an application to a local printer or a network printer. Several such scenarios are presented in Typical Printing Process Scenario Using a Raw Spool File, Typical Printing Process Scenario Using an EMF Spool File, and Typical Printing Process Scenario Using an EMF Spool File.

As shown in the typical printing process scenarios, the primary function of a Windows 95 printer driver is to handle requests from GDI. In most cases, you will be able to write a printer mini driver, which is easier to do than writing a driver that contains all the code necessary to carry out all the GDI requests.

Microsoft provides in the Windows 95 DDK a printer driver called the Universal Printer Driver (Unidriver), which is capable of performing most GDI requests, such as printing text, rendering bitmaps, or advancing a page. Instead of developing code to support all the functions GDI supports, a printer vendor writes a mini driver that exports entry points that accept the GDI requests and then calls the Unidriver code to carry out the request. A mini driver also contains data that defines unique characteristics of the vendor's printer, which the Unidriver uses to adapt its actions to different printers.

For more information about writing a mini driver, see About Printer Minidrivers.

The Windows 95 Unidriver supports most types of printers and Microsoft provides generic printer drivers for the printer types not supported by the Unidriver. The types of printers not supported by the Unidriver are shown in the following table, along with the name of the Microsoft-provided printer driver that does support each of these printer types.

Printer Type

Approximate Number of Printer Models of That Type

FileName of Microsoft-Provided Drivers

Color Deskjets

A handful.

DESKJETC.DRV

Plotters

A dozen or so.

HPPLOT.DRV

PostScript

Numerous

PSCRIPT.DRV


If your color desk jet, plotter, and/or Postscript printer is compatible with the Microsoft-provided driver, then you will not have to write a printer driver because you can install the Microsoft-provided driver to support your color desk jet printer, plotter or PostScript printer.

If you are developing an advanced, next-generation printer, which is incompatible with the Windows 95 Unidriver or PSCRIPT.DRV, DESKJETC.DRV, or HPPLOT.DRV, then you will have to create a printer driver that fully implements all of the functions required by GDI. Documentation for doing this will be provided on the MSDN CD-ROM after initial shipment of the Windows 95 DDK. Some guidelines for developing a complete printer driver (instead of developing a minidriver that works with the Windows 95 Unidriver) are given in What's New for Printer Drivers in Windows 95.