Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. printer help?

printer help?

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    murali_utr
    wrote on last edited by
    #1

    hi, i need to display the printer status. whether it is connected or switched on or not. there is any api call or mfc call for this. share with me. any one help to me. thanks in advance. Murali.M

    B 1 Reply Last reply
    0
    • M murali_utr

      hi, i need to display the printer status. whether it is connected or switched on or not. there is any api call or mfc call for this. share with me. any one help to me. thanks in advance. Murali.M

      B Offline
      B Offline
      Brian Shifrin
      wrote on last edited by
      #2

      There aren't any good way to get printer status in windows with most print drivers.... 1) First 2k, and XP does not poll printer status unless you submit a job. 2) GetPrinter return status success even if printer turned off 3) Let's say you submited job... and do something like GetJob.... - Error reported after ~60 seconds - Most print drivers will only report "printer out of paper" as universal error, printer offline / opened / low inc -> "out of paper". - Now let's say spooler returned status printed and job removed from the job queue. It really means nothing. Printer buffers are so large these days your entire job could be spooled to printer buffer before printer even tried to print. - You detected somewhat error in the print queue, and decided to cancel the job... it takes about 90 seconds to cancel print job... If during those 90 seconds error condition is fixed, job will be printed anyway... I wrote some code in the past for "secured & guaranted" check printing and it was a pain ... Had to exclude number of printers ( badly written drivers )... Also AddMonitor is helpfull but only for local printing....

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups