About Printer Drivers

Windows 95 printer drivers manage all printer output for applications. For an overview of Windows 95 printer drivers, see About Windows 95 Printer Drivers .

Note

You should develop a Windows printer driver only if the Unidriver does not support your printing device. If the Unidriver does support your device, you should use the UniTool application to develop a printer minidriver. For more information about the Unidriver, the UniTool application, and printer minidrivers, see About Printer Minidrivers.

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 About Windows 95 Printer Drivers .

The printer driver functions and structures that are new for Windows 95, or are significantly modified, are listed in the table below.

Function or Structure

Description

Comment

DeviceCapabilties

Retrieves the capabilities of the printer device driver.

Windows 3.x drivers running under Windows 95 are strongly encouraged to export the DeviceCapabilities function. Printer drivers written to take advantage of the new Windows 95 printer support must export the DeviceCapabilities function. See the Windows 3.1 DDK "Device Driver Adaptation Guide" for a definition of the DeviceCapabilities function.

DEVMODE structure

Structure that contains information about the device initialization and environment of a printer. Applications pass this structure to ExtDeviceMode and DeviceCapabilities functions exported by a printer driver.

About a dozen new members have been added to the DEVMODE structure to support the new Windows 95 printer support. See New Function and Structure Reference for more information.

DrvGetPrinterData

Retrieves printer driver information from the registry. Typically used to initialize the DEVMODE structure.

See New Function and Structure Reference for more information.

DrvSetPrinterData

Stores data from the extended DEVMODE structure in the registry.

See New Function and Structure Reference for more information.

ExtDeviceMode

Retrieves or changes device-initialization information for a given driver, or displays a driver-supplied dialog box for configuring the driver. Applications call ExtDeviceMode when the user requests setting up the printer as part of preparing for a print job.

Windows 3.x drivers running under Windows 95 are strongly encouraged to export the ExtDeviceMode function. Printer drivers written to take advantage of the new Windows 95 printer support must export the ExtDeviceMode function.

ExtDeviceModePropSheet

Presents a property sheet to the user for controlling the attributes of a printer.

See New Function and Structure Reference for more information.

ExtTextOut

Writes text strings by converting characters in a given string into raster, vector, or outline glyphs and copies the glyphs to the given device or bit map.

For Windows 95, changes have been made to the 16-bit ExtTextOut function exported by GDI. These changes enable printer drivers to more easily support True Type fonts non-Windows ANSI character sets and True Type fonts using character sets with more than 256 characters.