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++.
精彩评论