Article ID: 23976 - Last Review: December 1, 2003 - Revision: 2.0 Sending Output to a PrinterThis article was previously published under Q23976 On This PageSUMMARY
This article presents three methods an application can use to send
output to a printer.
MORE INFORMATIONMethod 1The first method uses the fprintf() function with the preopened "stdprn" stream. The following code example demonstrates this technique:Method 2Another method uses the fopen() function to open the LPT1, LPT2, or PRN device as a file and uses the fprintf() function to write data to the file handle returned by fopen(). The following code example demonstrates this technique:Method 3Finally, in MS-DOS, an application can use the int86() or int86x() functions to call one of the following BIOS printer services provided by Interrupt 17h:
service 0: send byte to the printer.
service 1: initialize the printer. service 2: get printer status. REFERENCES
For more information on the int86() and int86x() functions, refer to
the Microsoft C "Run-Time Library Reference" manual.
APPLIES TO
| Article Translations
|


Back to the top
