Commit 42c41144 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winspool.drv: Use '%u' to print GetLastError().

parent fb6569a7
...@@ -1488,7 +1488,7 @@ static HANDLE get_opened_printer_entry(LPCWSTR name, LPPRINTER_DEFAULTSW pDefaul ...@@ -1488,7 +1488,7 @@ static HANDLE get_opened_printer_entry(LPCWSTR name, LPPRINTER_DEFAULTSW pDefaul
goto end; goto end;
} }
if (RegOpenKeyW(hkeyPrinters, printername, &hkeyPrinter) != ERROR_SUCCESS) { if (RegOpenKeyW(hkeyPrinters, printername, &hkeyPrinter) != ERROR_SUCCESS) {
WARN("Printer not found in Registry: '%s'\n", debugstr_w(printername)); WARN("Printer not found in Registry: %s\n", debugstr_w(printername));
RegCloseKey(hkeyPrinters); RegCloseKey(hkeyPrinters);
SetLastError(ERROR_INVALID_PRINTER_NAME); SetLastError(ERROR_INVALID_PRINTER_NAME);
handle = 0; handle = 0;
...@@ -2073,7 +2073,7 @@ BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, LPPRINTER_DEFAU ...@@ -2073,7 +2073,7 @@ BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, LPPRINTER_DEFAU
/* Get the unique handle of the printer or Printserver */ /* Get the unique handle of the printer or Printserver */
*phPrinter = get_opened_printer_entry(lpPrinterName, pDefault); *phPrinter = get_opened_printer_entry(lpPrinterName, pDefault);
TRACE("returning %d with 0x%x and %p\n", *phPrinter != NULL, GetLastError(), *phPrinter); TRACE("returning %d with %u and %p\n", *phPrinter != NULL, GetLastError(), *phPrinter);
return (*phPrinter != 0); return (*phPrinter != 0);
} }
...@@ -2905,7 +2905,7 @@ HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter) ...@@ -2905,7 +2905,7 @@ HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter)
size = DocumentPropertiesW(0, 0, pi->pPrinterName, NULL, NULL, 0); size = DocumentPropertiesW(0, 0, pi->pPrinterName, NULL, NULL, 0);
if(size < 0) { if(size < 0) {
FIXME("DocumentPropertiesW on printer '%s' fails\n", debugstr_w(pi->pPrinterName)); FIXME("DocumentPropertiesW on printer %s fails\n", debugstr_w(pi->pPrinterName));
size = sizeof(DEVMODEW); size = sizeof(DEVMODEW);
} }
if(pi->pDevMode) if(pi->pDevMode)
...@@ -2917,7 +2917,7 @@ HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter) ...@@ -2917,7 +2917,7 @@ HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter)
dmW->dmSize = size; dmW->dmSize = size;
if (0>DocumentPropertiesW(0,0,pi->pPrinterName,dmW,NULL,DM_OUT_BUFFER)) if (0>DocumentPropertiesW(0,0,pi->pPrinterName,dmW,NULL,DM_OUT_BUFFER))
{ {
WARN("DocumentPropertiesW on printer '%s' failed!\n", debugstr_w(pi->pPrinterName)); WARN("DocumentPropertiesW on printer %s failed!\n", debugstr_w(pi->pPrinterName));
HeapFree(GetProcessHeap(),0,dmW); HeapFree(GetProcessHeap(),0,dmW);
dmW=NULL; dmW=NULL;
} }
...@@ -3370,7 +3370,7 @@ DWORD WINAPI StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo) ...@@ -3370,7 +3370,7 @@ DWORD WINAPI StartDocPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo)
if(!AddJobW(hPrinter, 1, addjob_buf, sizeof(addjob_buf), &needed)) if(!AddJobW(hPrinter, 1, addjob_buf, sizeof(addjob_buf), &needed))
{ {
ERR("AddJob failed gle %08x\n", GetLastError()); ERR("AddJob failed gle %u\n", GetLastError());
goto end; goto end;
} }
...@@ -4299,7 +4299,7 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( ...@@ -4299,7 +4299,7 @@ static BOOL WINSPOOL_GetDriverInfoFromReg(
} }
if(!DriverName[0] || RegOpenKeyW(hkeyDrivers, DriverName, &hkeyDriver) != ERROR_SUCCESS) { if(!DriverName[0] || RegOpenKeyW(hkeyDrivers, DriverName, &hkeyDriver) != ERROR_SUCCESS) {
ERR("Can't find driver '%s' in registry\n", debugstr_w(DriverName)); ERR("Can't find driver %s in registry\n", debugstr_w(DriverName));
SetLastError(ERROR_UNKNOWN_PRINTER_DRIVER); /* ? */ SetLastError(ERROR_UNKNOWN_PRINTER_DRIVER); /* ? */
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment