Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Windows hooking
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 2-Feb-13 5:42am
(unknown member)
Comments
valery possoz at 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 at 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 at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100