Printer Escapes Under Windows 95

Last reviewed: September 29, 1995
Article ID: Q125692
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SUMMARY

Printer escapes are used to access special printer device features and have been used widely in Windows version 3.x. With Windows 95, Microsoft is encouraging application developers to move away from these escapes by providing GDI functionality to replace them.

For example, a Win32-based application should not call the NEXTBAND and BANDINFO escapes. Banding is no longer needed in Windows 95. Most of these escapes, however, are still provided for 16-bit-based applications for backwards compatibility. The only recommended escapes for 32-bit, Windows 95-based applications are the QUERYESCSUPPORT and PASSTHROUGH escapes.

MORE INFORMATION

Applications written for Windows version 3.x can use the QUERYESCSUPPORT and the PASSTHROUGH escapes, as well as the following 10 escapes. It is important to note that these escapes are only supported for backwards compatibility. All new Windows 95-based applications should use Win32 API that replaces these escapes:

   ABORTDOC
   ENDDOC
   GETPHYSPAGESIZE
   GETPRINTINGOFFSET
   GETSCALINGFACTOR
   NEWFRAME
   NEXTBAND
   SETABORTPROC
   SETCOPYCOUNT
   STARTDOC

The following functions should always be used in place of a printer escape:

   Function       Printer Escape Replaced
   ----------------------------------------
   AbortDoc       ABORTDOC
   EndDoc         ENDDOC
   EndPage        NEWFRAME
   SetAbortProc   SETABORTPROC
   StartDoc       STARTDOC

Windows 95 provides six new indexes for the GetDeviceCaps function that replace some additional printer escapes:

   Index for GetDeviceCaps   Printer Escape Replaced
   --------------------------------------------------------
   PHYSICALWIDTH             GETPHYSPAGESIZE
   PHYSICALHEIGHT            GETPHYSPAGESIZE
   PHYSICALOFFSETX           GETPRINTINGOFFSET
   PHYSICALOFFSETY           GETPRINTINGOFFSET
   SCALINGFACTORX            GETSCALINGFACTOR
   SCALINGFACTORY            GETSCALINGFACTOR

Although a lot of the escapes have been replaced with Win32 GDI equivalent APIs, not all device-dependent escapes have been replaced. It is up to the printer driver manufacturer to decide whether or not its Windows 95-based driver will contain device-specific escapes that were present in its Windows version 3.x driver. An example of a device-specific escape would be the Windows version 3.x PostScript driver's POSTSCRIPT_IGNORE escape. Before calling any of these escapes, an application must first call the QUERESCSUPPORT escape to find out if the escape is supported or not.


Additional reference words: 4.00
KBCategory: kbprint
KBSubcategory: GdiPrn


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.