다음을 통해 공유


POSTSCRIPT_DATA Printer Escape function

The POSTSCRIPT_DATA printer escape function sends data directly to a printer driver. To perform this operation, call the ExtEscape function with the following parameters.

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
    POSTSCRIPT_DATA

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

     

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

  • lpszInData [in]
    A pointer to the input structure required for the specified escape. The first word in the buffer contains the number of bytes of input data. The remaining bytes of the buffer contain the data itself.

  • 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

The return value is greater than zero if the function is successful and less than zero if not. A return value of zero indicates that the printer does not support this escape.

Remarks

The POSTSCRIPT_DATA function is identical to the PASSTHROUGH escape function except that it is supported by PostScript drivers in compatibility mode only. It is not supported by PostScript drivers in PostScript-centric mode or in GDI-centric mode.

Drivers in PostScript-centric mode can use the POSTSCRIPT_PASSTHROUGH escape function, and drivers in GDI-centric mode can use the PASSTHROUGH escape function. To set a PostScript driver's mode, call the POSTSCRIPT_IDENTIFY escape function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Printing

GDI Printer Escape Functions

ExtEscape

PASSTHROUGH

POSTSCRIPT_IDENTIFY

POSTSCRIPT_PASSTHROUGH