Checking printer status

jeffcoop_69

New Member
Hi all. I'm currently trying to come up with a way to see if I have any print jobs currently in the que or printing on a particular printer. I've come up with some useful functions in the "winspool.drv" library so far but haven't quite got it narrowed down to the the best way. I'm currently using the "OpenPrinterA" function to get the printer handle and the "GetJobA" function to check the jobs (actually the buffer size). My problem is that the GetJobA sometimes doesn't give me the results I'm expecting. If anyone has any ideas about how to get the information I'm looking for it would be greatly appreciated. Thanks.
 

jeffcoop_69

New Member
I answered my own questions. I should have been using the "GetPrinterA" function instead of the "GetJobA". When using the GetPrinterA function, if you pass in a level of 2 then it sets the number of printer jobs in the que for the specified printer in memory position 77 of the struct (memptr).
 
Top