I'm trying to get print jobs details generated from windows (AD based) print server which is serving more than 100s of client machines.
As I need to store some other details along with job details, used FindNextPrinterChangeNotification to get jobId at client(s) & passed that to WMI at server to get more job details.
Please refer both http://www.codeproject.com/Articles/51085/Monitor-jobs-in-a-printer-queue-NET and https://blogs.msdn.microsoft.com/ocleon/2008/03/26/get-print-jobs-using-wmi-and-managmentobjects/
But the thing is I'm getting different ids for same job at both server & client (for example: 29956 & 29).
Can anyone explain how to handle jobids between this two Apis and arrive a solution for this issue.
Edit 1: From domain client machines by connecting the print server (\ipaddress) and executing the FindNextPrinterChangeNotification method, got jobinfo details (jobid 29956). But at the server by executing the select query to wmi win32-printjob class, yields no results at all and what I got previously was clients local print jobid (29).
Can anyone shed some light on how to get job details at print server by executing wmi queries locally.