Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-11-20
1
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Robn earned 750 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

704 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