Solved

Printing Job Status!!!

Posted on 1997-09-09
5
524 Views
Last Modified: 2013-12-03
I am developing a program (by Visual C++ 4.1 under Win95) which requires retrieving the job status for the printer manager - such as printing, pending, and printed.
I try the following set of SDK functions :
     OpenPrinter(...),
     FindFirstPrinterChangeNotification(....),
     WaitForSingleObject(),
     FindNextPrinterChangeNotification( ,  , , ,)
     FindClosePrinterChangeNotification(, , ),
but it does not work correctly.
To describe more specificly, when I call

    HANDLE h_wait = FindFirstPrinterChangeNotification(h_pr,                        PRINTER_CHANGE_JOB, 0, NULL);

, the value for handle h_wait always returns 0x000000.

(P.S. The OpenPrinter function's 3rd parameter "LPPRINTER_DEFAULTS pDefault" requires the SERVER_ALL_ACCESS flag be masked, but the VC++ on-line documentation says this mask is ignored for Win95. I think
this point may be a possible reason.)
 
Can anyone show me how to use the above collection of SDK functions
correctly?

Thanks very much!

Wang-shing, Huang.
0
Comment
Question by:umaxsse
  • 3
5 Comments
 

Author Comment

by:umaxsse
Comment Utility
Edited text of question
0
 

Author Comment

by:umaxsse
Comment Utility
Edited text of question
0
 
LVL 3

Accepted Solution

by:
byang earned 120 total points
Comment Utility
I'm not sure about printer job change notifications, but to get a snapshot of current job status, GetJob() and EnumJobs() should work. Then you can combine them with your notification functions.
0
 

Author Comment

by:umaxsse
Comment Utility
My program needs not only a snapshot of current job status, but it requires the job-status-changed message directly sent by OS that I can monitor a specific print job. That's why I use the notification functions.
0
 

Expert Comment

by:louisju
Comment Utility
Hi
I have the same problem this time,
win95 doesn't support FindFirstPrinterChangeNotification(only
support on NT),
so I doesn't solve the printer status ,
If you have the answer ,
Please sent your fragment code to me.
                Thank  you in advance.
                       at3068@alltop.chiayi.com.tw
                       louisju@ms10.hinet.net
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now