wineps.drv: Write-strings warnings fix.
This commit is contained in:
parent
7aeefa305f
commit
c50fe56096
|
@ -531,6 +531,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
|||
char* ppdFileName = NULL;
|
||||
HKEY hkey;
|
||||
BOOL using_default_devmode = FALSE;
|
||||
static CHAR paper_size[] = "Paper Size";
|
||||
|
||||
TRACE("'%s'\n", name);
|
||||
|
||||
|
@ -598,10 +599,12 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
|||
}
|
||||
#endif
|
||||
if (!ppdFileName) {
|
||||
res = GetPrinterDataA(hPrinter, "PPD File", NULL, NULL, 0, &needed);
|
||||
static CHAR ppd_file[] = "PPD File";
|
||||
|
||||
res = GetPrinterDataA(hPrinter, ppd_file, NULL, NULL, 0, &needed);
|
||||
if ((res==ERROR_SUCCESS) || (res==ERROR_MORE_DATA)) {
|
||||
ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed);
|
||||
res = GetPrinterDataA(hPrinter, "PPD File", &ppdType, (LPBYTE)ppdFileName, needed, &needed);
|
||||
res = GetPrinterDataA(hPrinter, ppd_file, &ppdType, (LPBYTE)ppdFileName, needed, &needed);
|
||||
}
|
||||
}
|
||||
/* Look for a ppd file for this printer in the config file.
|
||||
|
@ -695,7 +698,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
|||
* the Devmode structure, but Wine doesn't currently provide a convenient
|
||||
* way to configure printers.
|
||||
*/
|
||||
res = GetPrinterDataA (hPrinter, "Paper Size", NULL, (LPBYTE) &dwPaperSize,
|
||||
res = GetPrinterDataA (hPrinter, paper_size, NULL, (LPBYTE) &dwPaperSize,
|
||||
sizeof (DWORD), &needed);
|
||||
if (res == ERROR_SUCCESS)
|
||||
pi->Devmode->dmPublic.u1.s1.dmPaperSize = (SHORT) dwPaperSize;
|
||||
|
|
Loading…
Reference in New Issue