BOOL DeletePrinter(hPrinter) | |||
HANDLE hPrinter; |
The DeletePrinter function removes a Printer that was added with AddPrinter
hPrinter
Indicates the Printer that is to be deleted. This Handle is obtained with the OpenPrinter function. This handle becomes invalid after this operation if successful.
If there are print jobs remaining to be processed for the specified printer, DeletePrinter marks the printer as pending deletion, then deletes it when all the print jobs have been printed. No print jobs can be added to a printer which is marked as pending deletion. A printer marked as pending deletion cannot be held, but its print jobs can be held, resumed, and restarted. If the printer is held and there are jobs for the printer, DeletePrinter will fail with an InvalidState error.
AddPrinter,