The information in this article applies to:
SUMMARY
The PC ROM BIOS printer services function Get Printer Status (INT 17H
Function 2H) can be used to determine if a printer is connected to a
specific port. To save time and potential data loss, an application
can use INT 17H Function 2H to determine if a printer is present
before entering the application's printing code. This article contains
code to make this determination.
Sample CodeThe following code defines a function IsPrinter():
For more information, please refer to "The MS-DOS Encyclopedia"
(Microsoft Press). Pages 163 and 164 contain an example of interrupt
driven communication with the printer. Appendix O details the ROM BIOS
functions and their parameters.
Additional query words:
Keywords : kbcode kb16bitonly kbWinOS310 kbDSupport kbSDKWin16 |
Last Reviewed: July 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |