Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi, I want to hook all info related to printer and what was printed, i.e I actually want to hook Spooler?

Any idea what to be sent to "SetwindowHookEx"?

Thanks
Posted
Comments
Valery Possoz 2-Feb-13 10:57am    
Here is a way to do it in C# using WMI for local printers. http://www.codekeep.net/snippets/d8dc075a-79d0-4cc2-95a5-b298dbea307c.aspx
Mike Meinz 2-Feb-13 11:11am    
You might find what you are looking for in the Printer Change Notification Functions. Rather than hooking a Windows API, you can use the facility that is provided to get notifications of printer activity.
POP_POP_R3T 7-Feb-13 2:41am    
Yeah, I would try FindFirstPrinterChangeNotification and wait for PRINTER_CHANGE_ADD_JOB. Then maybe try to call EnumJobs when the event is triggered.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900