diff --git a/channels/printer/client/win/printer_win.c b/channels/printer/client/win/printer_win.c index 9bd758931..7c62b4011 100644 --- a/channels/printer/client/win/printer_win.c +++ b/channels/printer/client/win/printer_win.c @@ -136,7 +136,7 @@ static void printer_win_close_printjob(rdpPrintJob* printjob) { } - if (!ClosePrinter(win_printer->hPrinter)) + if (!EndDocPrinter(win_printer->hPrinter)) { } @@ -208,6 +208,9 @@ static void printer_win_free_printer(rdpPrinter* printer) if (win_printer->printjob) win_printer->printjob->printjob.Close((rdpPrintJob*)win_printer->printjob); + if (win_printer->hPrinter) + ClosePrinter(win_printer->hPrinter); + if (printer->backend) printer->backend->ReleaseRef(printer->backend);