0

In the print spooler dialog for any installed printer, there is a menu option to use the printer offline. Enabling this option means that all documents will be queued until the said printer comes online.

The option I'm talking about:

The option I'm talking about

I do not want this for my application which interacts with a printer. This is because I need to tell the user (it's a requirement) when the printer is not connected. I'm using the GetPrinter function with the PRINTER_INFO_2 structure to check for the PRINTER_ATTRIBUTE_WORK_OFFLINE attribute.

When I manually disable the aforementioned option, my GetPrinter method tells me that the printer is offline when it is not connected and online when it is. When I leave that option enabled, the GetPrinter method always tells me that the printer is online (which I understand).

How do I disable the "Use Printer Offline" option programmatically?

Community
  • 1
  • 1
Anish Ramaswamy
  • 2,326
  • 3
  • 32
  • 63
  • Just wondering if you have read this KB: http://support.microsoft.com/kb/160456 – cha Jun 18 '13 at 23:16
  • @Cha - The KB article cited answers the question. Make it an answer so it can be accepted and others can benefit from it. – Carey Gregory Jun 20 '13 at 00:53

0 Answers0