none
Intercept any print job and prompt for password.

    Question

  • HI Everyone.

    I was introduced to prgramming a while ago...I wanted to create a windows app to prompt for a password when launching a printjob before it reaches my printer's print queue.

    Can anyone help me on this please.

    Best Regards

    The Randomiser Charter

    Thursday, April 13, 2017 11:17 AM

Answers

All replies

  • This would likely be a job for C++.  You might be able to do it from a managed application through a lot of Win32 interop, but determining the specific steps necessary would be outside the scope of this forum.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Thursday, April 13, 2017 9:54 PM
    Moderator
  • Hello,

    According to your description, I search for a way to handle print job event, please take a look:

    FindFirstPrinterChangeNotification and Monitoring print jobs.

    Best Regards,

    Cherry Bu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 14, 2017 3:21 AM
    Moderator
  • hi thanks for the advice

    but i really need an app to control my printer!

    Friday, April 14, 2017 5:32 AM
  • but i really need an app to control my printer!

    There are a number of applications available for managing your print queues in a Windows environment.  For example:  http://www.softwareshelf.com/products/print_queue_manager.htm
    Friday, April 14, 2017 7:25 AM
  • hi thanks for the advice

    but i really need an app to control my printer!

    FindFirstPrinterChangeNotification()
    FindNextPrinterChangeNotification()
    if pdwChange = PRINTER_CHANGE_ADD_JOB you get the Job ID from PRINTER_NOTIFY_INFO_DATA
    You pause the Job with
    SetJob() and JOB_CONTROL_PAUSE
    You call your Dialog Box, then

    you resume the Job with
    SetJob() and JOB_CONTROL_RESUME
    or you cancel it with
    SetJob() and JOB_CONTROL_DELETE

    Friday, April 14, 2017 8:46 AM
  • hi thanks for the advice

    but i really need an app to control my printer!

    FindFirstPrinterChangeNotification()
    FindNextPrinterChangeNotification()
    if pdwChange = PRINTER_CHANGE_ADD_JOB you get the Job ID from PRINTER_NOTIFY_INFO_DATA
    You pause the Job with
    SetJob() and JOB_CONTROL_PAUSE
    You call your Dialog Box, then

    you resume the Job with
    SetJob() and JOB_CONTROL_RESUME
    or you cancel it with
    SetJob() and JOB_CONTROL_DELETE

    And what prevents someone from opening the print queue while the dialog is shown and selecting resume from the print manager without entering anything in the password dialog?


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Friday, April 14, 2017 11:50 AM
    Moderator
  • And what prevents someone from opening the print queue while the dialog is shown and selecting resume from the print manager without entering anything in the password dialog?


    Yes, but if the OP displays a Password dialog, he must lock the desktop

    • Edited by Castorix31 Friday, April 14, 2017 12:54 PM
    Friday, April 14, 2017 12:53 PM
  • If possible, can you post the program syntaxes cause i am having some difficulties in making one

    Best Regards,

    The randomiser charter

    Saturday, April 15, 2017 2:09 PM