Condividi tramite


QUERYESCSUPPORT Printer Escape function

The QUERYESCSUPPORT printer escape function checks the implementation of a printer escape function.

Syntax

int ExtEscape(
  _In_  HDC    hdc,
  _In_  int    nEscape,
  _In_  int    cbInput,
  _In_  LPCSTR lpszInData,
  _In_  int    cbOutput,
  _Out_ LPSTR  lpszOutData
);

Parameters

  • hdc [in]
    A handle to the printer device context.

  • nEscape [in]
    The escape function to be performed.

    Value Meaning
    QUERYESCSUPPORT

    Determines whether the device driver implements a particular escape function.

     

  • cbInput [in]
    The number of bytes of data pointed to by the lpszInData parameter.

    For this escape, set this value to sizeof ( DWORD ).

  • lpszInData [in]
    A pointer to the DWORD that contains the escape value to query. The value can be an application-defined escape value or one of the following pre-defined escape values.

    Value Meaning
    CHECKJPEGFORMAT

    Checks whether the printer supports JPEG images.

    CHECKPNGFORMAT

    Checks whether the printer supports PNG images.

    DRAWPATTERNRECT

    Draws a white, gray-scale, or black rectangle.

    GET_PS_FEATURESETTING

    Gets information about a specified feature setting of a PostScript driver.

    GETTECHNOLOGY

    Reports on whether the driver is a Postscript driver.

    PASSTHROUGH

    Allows the application to send data directly to a printer. Supported in compatibility mode and GDI-centric mode.

    POSTSCRIPT_DATA

    Allows the application to send data directly to a printer. Supported only in compatibility mode.

    POSTSCRIPT_IDENTIFY

    Sets a PostScript driver to GDI-centric or PostScript-centric mode.

    POSTSCRIPT_INJECTION

    Inserts a block of raw data in a PostScript job stream.

    POSTSCRIPT_PASSTHROUGH

    Sends data directly to a PostScript printer driver. Supported in compatibility mode and PostScript-centric mode.

    SPCLPASSTHROUGH2

    Enables applications to include private procedures and other resources at the document-level save context.

     

  • cbOutput [in]
    The number of bytes of data pointed to by the lpszOutData parameter.

    For this printer escape function, the value of this parameter is 0.

  • lpszOutData [out]
    A pointer to the structure that receives output from this escape.

    For this printer escape function, the value of the parameter is NULL.

Return value

If the escape function specified in lpszInData is supported, the function returns a value greater than zero. If the function specified in lpszInData is not supported, the function returns zero. If an error occurs, the function returns a value less than zero.

Requirements

Header

Wingdi.h

See also

GDI Printer Escape Functions

Escape

ExtEscape