Click here to Skip to main content
12,297,912 members (57,207 online)
Rate this:
 
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 4:42am
(unknown member)
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2016
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