CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2001
    Posts
    401

    Printer status wor "Mission Impossible 3"

    Well all I need to know is like there is a paper jam or printer is out of papaer.

    But the status member of the JOB_INFO_2 structure is either showing priniting or 0, which in either case does not tell me that the printer has stuck.

    I am assuming I can use the fact that the job has been in que for like forever and since its not finishing up as an indicator that the printer is out of papaer or stuck.

    But **** I thought there would be a way to poll the printer about the status of the prinitng, and worst of all if I try to get the number of pages from the job_info_2 structure, they have a language of their own, sometimes they increase all fine, totalpages tell me how many pages, and pages printed tells me how many printed, but then on some printers it just keeps on updating the total pages member, so if its a five page doc, after 4 pages, pages printed is still 0, but the total pages is like 9.

    The only thing that works so far is the document name.....and I am gald for that for one, atleast I can display that your print was started, and what happened after that is better left to god and the printer, as I cannot, and windows for **** sure wont tell me anything.

    But any suggestions on how I can get some good status from the printer would be a real help.

    I have even tried to use the PRINTER_INFO_2 structure's status memeber but its always 0 no matter what, even when the printer is crying out loud for pages.

    I have used a combination of EnumJobs, OpenPrinter,GetPrinter to get what I have so far, and ofcourse the codegurus.......

    I am using vc++6/windows xp/mfc/win32.

    thanks for your time!
    Pauli

  2. #2
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Are you checking the pStatus prior?

    http://support.microsoft.com/default...b;en-us;160129

  3. #3
    Join Date
    Nov 2001
    Posts
    401

    No

    I remove paper from the printer, then print a page, then start my progra,. so Isee the job is there, but ptatus is null most of the times, and "Printing" sometimes, but never its like Job paused, out of paper...


    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured