开发者

How to delete all the jobs from the printer

I am new to the C++ program. How to send the j开发者_高级运维ob to the printer and how to delete the jobs from the printer which is yet to be printed using win32 API.


Open a handle to a printer using the OpenPrinter API call. Alternatively you might get this handle from the Printers unit in the VCL instead. When you have the handle you can use the SetPrinter API call to reset (purge) the printer queue. Simply pass the PRINTER_CONTROL_PURGE as the command parameter.

I found a simple example using VB (here), which shows the use of the commands, if I find the time can make a somewhat similar example using C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜