DosPrintQPurge

The DosPrintQPurge API deletes all pending jobs in a printer queue, except any currently printing. A print job that is printing is not affected.

If a printer queue is pending deletion when DosPrintQPurge is called, the purge clears the way for the printer queue to be deleted at the end of the current printing job.