• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 562
  • Last Modified:

Printing Job Status!!!

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
umaxsse
Asked:
umaxsse
  • 3
1 Solution
 
umaxsseAuthor Commented:
Edited text of question
0
 
umaxsseAuthor Commented:
Edited text of question
0
 
byangCommented:
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
 
umaxsseAuthor Commented:
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
 
louisjuCommented:
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

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now