Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Printer Driver Environment
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
The printer-driver environment consists of information about the printer,
such as font cartridges, paper trays and sizes, printer orientation,
graphics capabilities, color, and other advanced features. Windows
applications use this information to create printed output that takes full
advantage of the printer environment.
 
Printers normally have a large number of options from which the user can
select. This information can come from any of four sources:
 
♦  The driver's default setup.
 
♦  The driver's WIN.INI section of user options. The WIN.INI should maintain
   at least one such section so that modified printer setups can be retained
   from session to session. This information is edited by the driver's Setup
   dialog box.
 
♦  The driver may call GDI to retain the driver's environment from device
   context to device context on a port-by-port basis. This allows faster
   initialization of the driver and avoids the time-consuming process of
   reading options from the WIN.INI file.
 
♦  The application can pass the environment to the driver in a buffer
   pointed to by the lpInitData parameter of the Enable function.
 
Upon device initialization (that is, during the pair of Enable functions),
this information is used to set up information in the GDIINFO and PDEVICE
structures. For example, the paper size selection will affect the height and
width fields. Also, a printer that allows multiple graphics densities will
modify the various resolution fields.
 
 
                                      ♦