PrintQueueWatch
-
Anybody has use the PrintQueueWatch dll for monitor printJobs and printers. I'm using the PrintQueueWatch dll for a simple app to monitor printers. I wanna know how to use the function PrintJob.Transfer.(string printerName, bool transfer) The function is for transfer the print job to another printer, It's seems very easy to use, the function needs the printer name and a bool value to keep or not the print job in the original printer but the problem is that always raises an exception access denied printQueueWatch collection = new PrintQueueWatch.PrinterCollection(); PrinterInformation printer = collection.Where(l=>l.printername == "the printer that I'm using") printer.PrinterJobs.getJobById(Id).Transfer("the printer to transfer the printerJob", false) // false to keep the job in the original Printer. The transfer function says access denied, it seems permissions to acces the new printer. Thanks
-
Anybody has use the PrintQueueWatch dll for monitor printJobs and printers. I'm using the PrintQueueWatch dll for a simple app to monitor printers. I wanna know how to use the function PrintJob.Transfer.(string printerName, bool transfer) The function is for transfer the print job to another printer, It's seems very easy to use, the function needs the printer name and a bool value to keep or not the print job in the original printer but the problem is that always raises an exception access denied printQueueWatch collection = new PrintQueueWatch.PrinterCollection(); PrinterInformation printer = collection.Where(l=>l.printername == "the printer that I'm using") printer.PrinterJobs.getJobById(Id).Transfer("the printer to transfer the printerJob", false) // false to keep the job in the original Printer. The transfer function says access denied, it seems permissions to acces the new printer. Thanks
You should ask whoever publishes the PrintQueueWatch DLL.
The difficult we do right away... ...the impossible takes slightly longer.
-
Anybody has use the PrintQueueWatch dll for monitor printJobs and printers. I'm using the PrintQueueWatch dll for a simple app to monitor printers. I wanna know how to use the function PrintJob.Transfer.(string printerName, bool transfer) The function is for transfer the print job to another printer, It's seems very easy to use, the function needs the printer name and a bool value to keep or not the print job in the original printer but the problem is that always raises an exception access denied printQueueWatch collection = new PrintQueueWatch.PrinterCollection(); PrinterInformation printer = collection.Where(l=>l.printername == "the printer that I'm using") printer.PrinterJobs.getJobById(Id).Transfer("the printer to transfer the printerJob", false) // false to keep the job in the original Printer. The transfer function says access denied, it seems permissions to acces the new printer. Thanks
At a guess - and I don't play with print queues so that's all it can be - it's that your app needs elevation, or you need specific permissions to access the two print queues involved. "Access denied" means you don't have a required permission, so it's likely to be one or the other. Which makes a lot of sense, since the print queue may contain items from multiple users! The simplest way to check which is to run your app in admin mode and see if the problem goes away. If it does, then that's what you need - an elevated app. If it doesn't, then you need to tell the printer queues "who you are" in order to change them. This may help: https://stackoverflow.com/questions/8348743/access-denied-trying-to-purge-printqueue-in-c-sharp[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!