short Escape(hDC, PASSTHROUGH,nCount,lpInData, NULL)
This escape allows the application to send data directly to the printer, bypassing the
standard print-driver code.
NOTE:
To use this escape, an application must have thorough knowledge of how the particular printer operates.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
nCount | short Specifies the number of bytes to which the lpInData parameter points. | |
lpInData | LPSTR Points to a structure whose first word (16 bits) contains the number of bytes of input data. The remaining bytes of the structure contain the data itself. |
The return value specifies the number of bytes transferred to the printer if the escape is successful. It is less than zero if the escape is not implemented, and less than or equal to zero if the escape is not successful.
There may be restrictions on the kinds of device data an application can send to the device without interfering with the operation of the driver. In general, applications must avoid resetting the printer or causing the page to be printed.
It is strongly recommended that applications not perform functions that consume printer memory, such as downloading a font or a macro.
An application can avoid corrupting its data stream when issuing multiple, consecutive PASSTHROUGH escapes if it does not access the printer any other way during the sequence.