short Escape(hdc, PASSTHROUGH, NULL,lpInData, NULL)
The PASSTHROUGH printer 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 complete information about how the particular printer operates.
hdc
HDC Identifies the device context.
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. This value is less than or equal to zero if the escape is not successful or not implemented.
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 do not perform actions 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 by not accessing the printer any other way during the sequence.
An application can guarantee that the PASSTHROUGH escape will be successful if it uses a “save” PostScript operator before sending PASSTHROUGH data and a “restore” operator after. Avoiding graphics device interface (GDI) functions between calls to the PASSTHROUGH escape and avoiding commands that cause a page to eject are other means to ensure that the escape will be successful.