winspool: Add support for level 1 printer info to GetPrinter.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2019-09-27 13:22:18 +08:00 committed by Alexandre Julliard
parent eec7f10512
commit df8c52cd91
1 changed files with 18 additions and 0 deletions

View File

@ -4435,6 +4435,24 @@ BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
}
switch(Level) {
case 1:
{
PRINTER_INFO_1W *pi1 = (PRINTER_INFO_1W *)pPrinter;
size = sizeof(PRINTER_INFO_1W);
if (size <= cbBuf) {
ptr = pPrinter + size;
cbBuf -= size;
memset(pPrinter, 0, size);
} else {
pi1 = NULL;
cbBuf = 0;
}
ret = WINSPOOL_GetPrinter_1(hkeyPrinter, pi1, ptr, cbBuf, &needed);
needed += size;
break;
}
case 2:
{
PRINTER_INFO_2W *pi2 = (PRINTER_INFO_2W *)pPrinter;