How can I keep track of Printer\'s activities such as:
explaining it here is so boring. I suggest you read the full article http://support.microsoft.com/kb/160129
Perhaps use the Spooler API to get going? I've not used this before, but I recon it'll involve a fair amount of P/Invoke.
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/a7160b44-0984-48c4-afef-b9a6ee4a8483
You would want to set up a service that listens to printer change notification events using the FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification, and FindClosePrinterChangeNotification functions. And listen to the PRINTER_CHANGE_JOB event. When a print job event is raised you can get access to the necessary job information from the PRINTER_NOTIFY_INFO_DATA structure.
This method should be taken with a grain of salt. I have found from experience that printer events are unreliable when the server is under load with many print jobs occurring at the same time. Some printer events will not fire.
Obviously this solution will take a whole lot of P-Invoking & Marshalling, so I wish you luck. If writing the application in C++ is an option it would probably be easier than in C# in this case.
I guess you could use WMI.
Here is a blog-entry regarding getting printer-info using WMI: http://aleemkhan.wordpress.com/2005/09/20/getting-printer-information-through-wmi/
Here is some code on getting printer events (in VB.Net though): http://social.technet.microsoft.com/Forums/en/ITCG/thread/71258e18-5516-4a90-be76-5b83855b2841