Supporting Device-specific Functions

Optional functions that support device-dependent functions in the printer not covered by regular GDI operations are the following:

·DrvEscape

·DrvDrawEscape

These entry points enable the driver to provide escape functions used to "tunnel" through GDI, essentially turning GDI into a dumb communications line. The PostScript driver is an example of a driver that supports these.

DrvEscape is used to query information from a device when the information is not available in the device-independent DDI. For example, information that could be obtained directly from a device might include the phone number for a FAX machine. Drawing on a surface is allowed, but, because no CLIPOBJ is passed in, as it is in DrvDrawEscape, drawing in DrvEscape is limited. The escape depends on the value of the iEsc parameter

The driver should support DrvDrawEscape when the device allows device-specific drawing operations not available in a device-independent DDI. DrvDrawEscape gets a CLIPOBJ as an input parameter. For example, the PostScript driver implements this call to support the printing of encapsulated PostScript (EPS) data. The escapes that are supported are determined by DrvEscape.