?
Solved

Printing Job Status!!!

Posted on 1997-09-09
5
Medium Priority
?
546 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:umaxsse
ID: 1406227
Edited text of question
0
 

Author Comment

by:umaxsse
ID: 1406228
Edited text of question
0
 
LVL 3

Accepted Solution

by:
byang earned 240 total points
ID: 1406229
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
ID: 1406230
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
ID: 1406231
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

800 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