T
Tomas Svoboda
Guest
Hello!
I want to monitor print jobs on remote (shared) printers from service. I have impersonation access token for user who connects printer (e.g. \\PC-PRINTER\Canon Printer).
After impersonation as the user I call OpenPrinter to printer and then FindFirstPrinterChangeNotification (type is JOB_NOTIFY_TYPE and filter PRINTER_CHANGE_DELETE_JOB | PRINTER_CHANGE_SET_JOB). OpenPrinter succeeded but FindFirstPrinterChangeNotification failed with ERROR_INVALID_HANDLE error.
If I try it as normal user (owner of printer - not a service), all succeeded and notification are functional. I suppose that I have to set some security attributes for impersonation token or pass some other attributes to OpenPrinter.
Does anybody know the solution?
Thanks!
Continue reading...
I want to monitor print jobs on remote (shared) printers from service. I have impersonation access token for user who connects printer (e.g. \\PC-PRINTER\Canon Printer).
After impersonation as the user I call OpenPrinter to printer and then FindFirstPrinterChangeNotification (type is JOB_NOTIFY_TYPE and filter PRINTER_CHANGE_DELETE_JOB | PRINTER_CHANGE_SET_JOB). OpenPrinter succeeded but FindFirstPrinterChangeNotification failed with ERROR_INVALID_HANDLE error.
If I try it as normal user (owner of printer - not a service), all succeeded and notification are functional. I suppose that I have to set some security attributes for impersonation token or pass some other attributes to OpenPrinter.
Does anybody know the solution?
Thanks!
Continue reading...