Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 12110 - Last Review: December 1, 2003 - Revision: 2.0
Calling ROM BIOS Routines to Check the Printer Status
This article was previously published under Q12110
The text below provides a method for a C application to check the
status of a printer before it attempts to write data to the printer.
Even though the C language does not define a portable method to check
printer status, your application can retrieve this information using
routines in the ROM BIOS. To obtain status information, call the
_bios_printer() function, an interface to Interrupt 17H, Function 2,
or call the interrupt directly through the int86() functions. For more
information, see the online help file or the run-time library
reference manual provided with your compiler.
In your application, you may want to process printer errors by
changing the critical error handler interrupt vector (the Interrupt
24H vector). The default critical error handler presents the user with
the notorious "abort, retry, ignore" message. Your application can
provide a substitute message, like "Printer offline: place printer on
line and press Y to continue."
For more information about the ROM BIOS routines or interrupt
handlers, refer to one of the following two books from Microsoft
Press:
- "The Peter Norton Programmer's Guide to the IBM PC,"
by Peter Norton
- "Advanced MS-DOS," by Ray Duncan
APPLIES TO
- Microsoft C Professional Development System 6.0
- Microsoft C Professional Development System 6.0a
- Microsoft C Professional Development System 6.0a
- Microsoft C/C++ Professional Development System 7.0
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 1.5 Professional Edition
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate