PRINTER_INFO_2 Value is always 0

  • Thread starter Thread starter Shira Tishler
  • Start date Start date
S

Shira Tishler

I'm working on Windodws 2000. programming in C++.

I'm interested in getting the current status of a local
printer: no communication, out of paper etc.

I use the PRINTER_INFO_2 variant and I'd like to get the
status.

The status I get is always 0, no matter what is the real
status shown in the Printer status window.

Is there another variant I should use if I want to know
why the printer is not printing ?
 
Hi Shira,

Getting the actual printer status can be something of a problem, since it is
not very good supported. Mostly it depends on if the printer driver or
portmonitor sets the status. Mostly you can only get the status when
printing a job, and the job fails.

See the article Q160129

http://support.microsoft.com/default.aspx?scid=kb;EN-US;160129

The best way would be to program your own portmonitor, but that can be
something of a challenge, since different printer models support different
ways to communicate. Although most newer networkprinters support status
information via SNMP (Printer MIB)

Best regards,
Christoph Lindemann
 
Back
Top