Solved

Getting printer status - USB, network, etc...

Posted on 2003-11-20
1
418 Views
Last Modified: 2010-04-05
I can't seem to find a reliable way to get the status of a printer to know if it out of paper, powered off, etc...

I am looking for a solution that will work with USB, Network, paral. printers
0
Comment
Question by:moonrise
1 Comment
 
LVL 2

Accepted Solution

by:
Robn earned 250 total points
ID: 9790839
I haven't tried this but Delphi has a unit called WinSpool that has a number of implimented API's that can be called to retrieve printer information. Take a look at EnumPrinters. This method looks to have several types of records that can be passed in. The record TPrinterInfo2 has a Status member that you should be able to bitwise to determine if the PRINTER_STATUS_PAPER_OUT flag is set. You can look in the Printers unit to see how these API's are called.

Hope this helps,
Rob
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question