Reputation: 13
How do I detect that which client sends the print request to printer? When a request is sent to server which event will be raised on the server for this print request? I want to detect which user is printing how many pages in a day.
Upvotes: 1
Views: 467
Reputation: 1394
You can use WMI to monitor the printer.
WMI Tasks: Printers and Printing http://msdn.microsoft.com/en-us/library/windows/desktop/aa394598%28v=vs.85%29.aspx
Win32_PrintJob http://msdn.microsoft.com/en-us/library/windows/desktop/aa394370%28v=vs.85%29.aspx
Watch for instance creation of print jobs. PrintJob class has a totalPages.
Use System.Management to use WMI in C#
Upvotes: 1