https://bugs.winehq.org/show_bug.cgi?id=54379
--- Comment #20 from Eugene Savelov savelov@gmail.com --- (In reply to Piotr Caban from comment #16)
(In reply to MaranBr from comment #6)
Created attachment 74015 [details] Trace file of print processor
The problem is visible in this line: 0374:trace:winspool:StartDocPrinterW (00000003, 1, 0021F008 {L"", L"", (null)})
Supplied DOC_INFO_1 structure passes empty string as pOutputFile. Probably we should handle empty string in the same way as NULL here but I will need to run some tests. Because of that, later, we're trying to use empty string as port name.
after applying below fix on wine 8.2 printing now works!
--- dlls/gdi32/dc.orig.c 2023-02-20 00:09:19.960931092 +0300 +++ dlls/gdi32/dc.c 2023-02-20 00:11:48.483031851 +0300 @@ -274,6 +274,7 @@ { memcpy( port, output, output_str.Length ); port[output_str.Length / sizeof(WCHAR)] = 0; + if (output_str.Length == 0) port = NULL; } dc_attr->hspool = HandleToULong( hspool ); dc_attr->output = (ULONG_PTR)port;