View Single Post
  #3  
Old October 22nd 19, 07:44 PM posted to alt.windows7.general,microsoft.public.windowsxp.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Printer Present For Real

Mandy wrote:
For Win XP and Win 7 Question

How do I know if a printer is actually there.
In Printers And FAXes it say all are ready but that is bogus.
I know one is off and is is "Ready". Haha.

Is there some printer ping or other test.

No, I do not want to print a test page since I will have to walk a mile
to see if it prints. Yes on the same LAN.


Printing is "a state of mind".

It's not a real thing, according to Microsoft.

The architecture has a "spooler". If you bring up the monitor,
it shows the spool status. If the spool has items in it, it is
at that point that the status of the printer is ascertained.
The printer could be a remote (networked) device. It could
be offline, or not visible. The monitor for that (virtual)
printer should have a status, indicating that printing is
"stuck" because the device is "not there".

As a consequence of this, you're really asking a question
about how the spooler knows the designated printer is present.

https://web.archive.org/web/20140526...hitecture.aspx

As an example, the comment text here points out the flaky
nature of something as simple as communicating via RPC
with the other computer and reading the printer. It's not
really reading a printer, it's reading the spooler.

https://docs.microsoft.com/en-us/win...cs/readprinter

Someone here, tries to get some information from a printer.
Apparently, the printer has to be set in "bidirectional mode"
(a term from the parallel port era, even though the bus
used for modern printing could be USB, which is bidirectional).

https://stackoverflow.com/questions/...r-winspool-drv

In the comments section here, you can see the focus is still
on "remote" implementations. To get printer status, you
need a "job number", implying "status is only a state
of mind" and you're not allowed to actually "touch" the
printer, due to the hands-off approach.

https://www.codeproject.com/Question...Printer-method

It suggests the only "code path" is the "spooler path".

Unless you go the Device Manager route, and that doesn't
allow checking any actual devices. You can only query
whether there are driver files present, and Device Manager
stack related stuff. There's no "test" button in there.

If there's a way to do this, it's well buried, probably
in the "write yer own spooler code" article :-/

Even the "printing ink" status is convoluted. My printer
(in hardware), had invoked its evil "cartridge is empty"
feature, after cleaning the heads. The spool status
did not indicate any problem. It was only during the
next print attempt, that the status of the cartridge
came back as a failure, and that's when I knew
"cartridge was empty". The light was flashing on the
printer, but its "non-ready" state was only available
in software, when the next job was queued in the spooler.
And that's a local USB printer, too.

Maybe if there was a printing method which did not use
the Windows spooler, you could get this info.

Paul
Ads