如何在 Windows 上查询打印队列
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/553051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to query the print queue on Windows
提问by FerranB
We are developing a critical application and need to have the finest control over the documents printed. To be sure on which documents are printed or not we want to check the printer queue.
我们正在开发一个关键应用程序,需要对打印的文档进行最精细的控制。为了确定哪些文档被打印,我们要检查打印机队列。
How can we query the print queue on Windows (status, queue list, errors, ...)?
我们如何在 Windows 上查询打印队列(状态、队列列表、错误等)?
回答by moogs
EnumPrintersto get the list of printers, EnumJobsto get a list of jobs for that printer. GetJobto get info on a specific job and SetJobto change the settings for that job (pause or cancel it).
EnumPrinters获取打印机列表,EnumJobs获取该打印机的作业列表。GetJob获取特定作业的信息,SetJob更改该作业的设置(暂停或取消)。
See more in the Printing and Print Spooler References.
在打印和打印后台处理程序参考中查看更多信息。
.NET has the PrintQueueand PrintServerclasses.
.NET 有PrintQueue和PrintServer类。
回答by lakshmanaraj
Following URLs may be of interest to you,
您可能对以下网址感兴趣,
http://www.codeproject.com/KB/printing/printwatchvbnet.aspx
http://www.codeproject.com/KB/printing/printwatchvbnet.aspx
and
和