2 * PROJECT: ReactOS Spooler Router
3 * LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation
4 * PURPOSE: Functions related to Printer Configuration Data
5 * COPYRIGHT: Copyright 2017 Colin Finck <colin@reactos.org>
11 GetPrinterDataExW(HANDLE hPrinter
, LPCWSTR pKeyName
, LPCWSTR pValueName
, LPDWORD pType
, LPBYTE pData
, DWORD nSize
, LPDWORD pcbNeeded
)
13 PSPOOLSS_PRINTER_HANDLE pHandle
= (PSPOOLSS_PRINTER_HANDLE
)hPrinter
;
18 // Yes, Windows checks for the handle here and sets the last error to ERROR_INVALID_HANDLE,
19 // but returns FALSE and not the error code.
20 SetLastError(ERROR_INVALID_HANDLE
);
24 // Call GetPrinterDataEx of the Print Provider.
25 return pHandle
->pPrintProvider
->PrintProvider
.fpGetPrinterDataEx(pHandle
->hPrinter
, pKeyName
, pValueName
, pType
, pData
, nSize
, pcbNeeded
);
29 GetPrinterDataW(HANDLE hPrinter
, LPWSTR pValueName
, LPDWORD pType
, LPBYTE pData
, DWORD nSize
, LPDWORD pcbNeeded
)
31 // The ReactOS Printing Stack forwards all GetPrinterData calls to GetPrinterDataEx as soon as possible.
32 // This function may only be called if spoolss.dll is used together with Windows Printing Stack components.
33 WARN("This function should never be called!\n");
34 return GetPrinterDataExW(hPrinter
, L
"PrinterDriverData", pValueName
, pType
, pData
, nSize
, pcbNeeded
);
38 SetPrinterDataExW(HANDLE hPrinter
, LPCWSTR pKeyName
, LPCWSTR pValueName
, DWORD Type
, LPBYTE pData
, DWORD cbData
)
40 PSPOOLSS_PRINTER_HANDLE pHandle
= (PSPOOLSS_PRINTER_HANDLE
)hPrinter
;
45 // Yes, Windows checks for the handle here and sets the last error to ERROR_INVALID_HANDLE,
46 // but returns FALSE and not the error code.
47 SetLastError(ERROR_INVALID_HANDLE
);
51 // Call SetPrinterDataEx of the Print Provider.
52 return pHandle
->pPrintProvider
->PrintProvider
.fpSetPrinterDataEx(pHandle
->hPrinter
, pKeyName
, pValueName
, Type
, pData
, cbData
);
56 SetPrinterDataW(HANDLE hPrinter
, PWSTR pValueName
, DWORD Type
, PBYTE pData
, DWORD cbData
)
58 // The ReactOS Printing Stack forwards all SetPrinterData calls to SetPrinterDataEx as soon as possible.
59 // This function may only be called if spoolss.dll is used together with Windows Printing Stack components.
60 WARN("This function should never be called!\n");
61 return SetPrinterDataExW(hPrinter
, L
"PrinterDriverData", pValueName
, Type
, pData
, cbData
);