每次用户发送打印命令时如何进行身份验证 [英] How to authenticate users every time they send print commands
问题描述
需要一个想法,在用户发送命令进行打印之前,编写代码对用户进行身份验证.
Need an idea to write a code to authenticate users before they send the commands to print.
最初的想法是创建一个Windows服务,该服务可以绕过对 打印机驱动程序,并且可以打开用于登录凭据的表单.
Initial idea is to create a windows service which could bypass the call to the printer driver and can open a form for login credentials.
,以便只有符合每月打印页面配额资格的经过身份验证的用户才能访问打印机.
so that only the authenticated users who qualifies the monthly quota for printing the pages could access the printer.
请分享您的看法,这种方法是否可行以及如何实现.
Please share your views whether this approach is feasible and how this can be achieved.
推荐答案
您可以监视Win32_PrintJob
WMI类或winspool.drv
.您可以在此处和 FindFirstPrinterChangeNotification 方法.
You can monitor the Win32_PrintJob
WMI Class or the winspool.drv
. You will find additional information here and here. Also, have a look at the FindFirstPrinterChangeNotification method.
监视Win32_PrintJob
WMI类并暂停打印作业.如果用户尚未达到每月配额,请恢复作业.否则,将其删除.
Monitor the Win32_PrintJob
WMI Class and pause the print job. Resume the job if the user has not reached the monthly quota. Otherwise, delete it.
这篇关于每次用户发送打印命令时如何进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!