The following information is provided as is, and the authors take no responsibility for the correctness.
The PASSTHROUGH printer escape function sends data directly to a printer driver. To perform this operation, call the ExtEscape function with the following parameters.
#define PASSTHROUGH 19 int ExtEscape( hdc, // handle to DC (HDC) PASSTHROUGH, // nEscape parameter of ExtEscape cbInput, // bytes in input buffer lpszInData, // data to send to printer 0, // cbOutput parameter of ExtEscape NULL // lpszOutData parameter of ExtEscape );
Handle to the printer device context.
Specifies the size, in bytes, of the data pointed to by the lpszInData parameter.
Pointer to a buffer containing the data to send to the printer. The first word contains the number of bytes of input data. The remaining bytes of the buffer contain the data itself.
If the function succeeds, the return value is greater than zero. If the function fails or is not supported, the return value is less than or equal to zero.
Windows NT/2000/XP: To get extended error information, call GetLastError.
The PASSTHROUGH printer escape function is supported by PostScript drivers in GDI-centric mode or compatibility mode. It is not supported by PostScript drivers in PostScript-centric mode. Drivers in PostScript-centric mode can use the POSTSCRIPT_PASSTHROUGH escape function. To set a PostScript driver’s mode, call the POSTSCRIPT_IDENTIFY escape function.
For PASSTHROUGH data sent by EPSPRINTING or PostScript-centric applications, the PostScript driver will not make any modifications. For PASSTHROUGH data sent by other applications, if the PostScript driver is using BCP (Binary Communication Protocol) or TBCP (Tagged Binary Communication Protocol) output protocol, it will do the appropriate BCP or TBCP quoting on special characters as described in “Adobe Serial and Parallel Communications Protocols Specification.” This means that the application should send either ASCII or pure binary PASSTHROUGH data.