wineps.drv: Use const-correct GetPrinterDataEx() instead of GetPrinterData().
This commit is contained in:
parent
da92dcec66
commit
901969f624
|
@ -538,7 +538,6 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
||||||
char* ppdFileName = NULL;
|
char* ppdFileName = NULL;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
BOOL using_default_devmode = FALSE;
|
BOOL using_default_devmode = FALSE;
|
||||||
static CHAR paper_size[] = "Paper Size";
|
|
||||||
|
|
||||||
TRACE("'%s'\n", name);
|
TRACE("'%s'\n", name);
|
||||||
|
|
||||||
|
@ -606,12 +605,11 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!ppdFileName) {
|
if (!ppdFileName) {
|
||||||
static CHAR ppd_file[] = "PPD File";
|
res = GetPrinterDataExA(hPrinter, "PrinterDriverData", "PPD File", NULL, NULL, 0, &needed);
|
||||||
|
|
||||||
res = GetPrinterDataA(hPrinter, ppd_file, NULL, NULL, 0, &needed);
|
|
||||||
if ((res==ERROR_SUCCESS) || (res==ERROR_MORE_DATA)) {
|
if ((res==ERROR_SUCCESS) || (res==ERROR_MORE_DATA)) {
|
||||||
ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed);
|
ppdFileName=HeapAlloc(PSDRV_Heap, 0, needed);
|
||||||
res = GetPrinterDataA(hPrinter, ppd_file, &ppdType, (LPBYTE)ppdFileName, needed, &needed);
|
res = GetPrinterDataExA(hPrinter, "PrinterDriverData", "PPD File", &ppdType,
|
||||||
|
(LPBYTE)ppdFileName, needed, &needed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Look for a ppd file for this printer in the config file.
|
/* Look for a ppd file for this printer in the config file.
|
||||||
|
@ -706,8 +704,8 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
|
||||||
* the Devmode structure, but Wine doesn't currently provide a convenient
|
* the Devmode structure, but Wine doesn't currently provide a convenient
|
||||||
* way to configure printers.
|
* way to configure printers.
|
||||||
*/
|
*/
|
||||||
res = GetPrinterDataA (hPrinter, paper_size, NULL, (LPBYTE) &dwPaperSize,
|
res = GetPrinterDataExA(hPrinter, "PrinterDriverData", "Paper Size", NULL,
|
||||||
sizeof (DWORD), &needed);
|
(LPBYTE)&dwPaperSize, sizeof(DWORD), &needed);
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
pi->Devmode->dmPublic.u1.s1.dmPaperSize = (SHORT) dwPaperSize;
|
pi->Devmode->dmPublic.u1.s1.dmPaperSize = (SHORT) dwPaperSize;
|
||||||
else if (res == ERROR_FILE_NOT_FOUND)
|
else if (res == ERROR_FILE_NOT_FOUND)
|
||||||
|
|
Loading…
Reference in New Issue