Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. PrintQueueWatch

PrintQueueWatch

Scheduled Pinned Locked Moved C#
helptutorialcareer
3 Posts 3 Posters 23 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jorge Carlos Iglesias Alvarez
    wrote on last edited by
    #1

    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

    Richard Andrew x64R OriginalGriffO 2 Replies Last reply
    0
    • J Jorge Carlos Iglesias Alvarez

      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

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      You should ask whoever publishes the PrintQueueWatch DLL.

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      • J Jorge Carlos Iglesias Alvarez

        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

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        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!

        "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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups