Functions Defined by Printer Graphics DLLs
Like all graphics drivers, printer graphics DLLs are responsible for defining the following graphics DDI functions. Following DrvEnableDriver, the initial driver entry point, the remaining functions are listed in alphabetical order. Note that because GDI calls DrvEnableDriver by name, its name appears in bold. GDI calls all other display driver functions by way of an array of function pointers that DrvEnableDriver returns.
Allows the driver to initialize itself and return pointers to supported graphics DDI functions.
Provides the driver with a GDI handle to a device instance.
(Optional) Allows the driver to perform cleanup operations before being unloaded.
Allows the driver to remove device instance-specific information.
Allows the driver to remove a drawing surface.
Allows the driver to provide GDI with physical device characteristics and to initialize device instance-specific information.
Allows the driver to create a drawing surface.
(Optional) Returns requested device-specific information.
(Optional) Returns requested driver-specific information.
Printer graphics DLLs are also responsible for defining the following print-specific graphics DDI functions, which are called at certain points during the rendering of a print job.
When GDI has finished sending a document to the driver for rendering.
(Optional) When GDI has finished drawing a band for a physical page, so the driver can send the band to the printer.
(Optional) Before GDI begins drawing a band for a physical page, so the driver can supply GDI with band-specific information.
When GDI has finished drawing a physical page, so the driver can send the page to the printer.
(Optional) When GDI is ready to start sending bands of a physical page to the driver for rendering.
When GDI is ready to start sending a document to the driver for rendering.
When GDI is ready to start sending a document page to the driver for rendering.
Typically, a printer graphics DLL also defines whatever additional graphics DDI functions are necessary to accomplish print job rendering. The number and type of functions defined depends on:
Whether the driver supports use of GDI-managed or device-managed drawing surfaces (or both). For more information, see Surface Types.
The extent to which drawing operations can be handled by GDI instead of being performed by the driver itself. For more information, see Using the Graphics DDI.
All functions defined by printer graphics DLLs are called by GDI's kernel-mode graphics rendering engine (GRE).
The DrvEnableDriver and DrvQueryDriverInfo functions are exported by the graphics DLL. The addresses of all other supported graphics DDI functions are placed in a table that is returned by the DrvEnableDriver function.