Skip to content

Commit

Permalink
gdi32: Pass default DEVMODE to winspool in CreateDC.
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrCW authored and julliard committed Oct 2, 2023
1 parent 338cb12 commit b4b39bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dlls/gdi32/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ static BOOL print_copy_devmode( struct print *print, const DEVMODEW *devmode )
HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
const DEVMODEW *devmode )
{
PRINTER_DEFAULTSW prn_defaults =
{
.pDatatype = NULL,
.pDevMode = (DEVMODEW *)devmode,
.DesiredAccess = PRINTER_ACCESS_USE
};
UNICODE_STRING device_str, output_str;
driver_entry_point entry_point = NULL;
const WCHAR *display = NULL, *p;
Expand Down Expand Up @@ -280,7 +286,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
ERR( "no driver found for %s\n", debugstr_w(buf) );
return 0;
}
else if (!OpenPrinterW( (WCHAR *)device, &hspool, NULL ))
else if (!OpenPrinterW( (WCHAR *)device, &hspool, &prn_defaults ))
{
return 0;
}
Expand Down

0 comments on commit b4b39bf

Please sign in to comment.