2 * PROJECT: ReactOS Print Spooler Service
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Functions related to Printer Configuration Data
5 * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin@reactos.org)
11 _RpcDeletePrinterData(WINSPOOL_PRINTER_HANDLE hPrinter
, WCHAR
* pValueName
)
14 return ERROR_INVALID_FUNCTION
;
18 _RpcDeletePrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
, const WCHAR
* pValueName
)
21 return ERROR_INVALID_FUNCTION
;
25 _RpcDeletePrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
)
28 return ERROR_INVALID_FUNCTION
;
32 _RpcEnumPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter
, DWORD dwIndex
, WCHAR
* pValueName
, DWORD cbValueName
, DWORD
* pcbValueName
, DWORD
* pType
, BYTE
* pData
, DWORD cbData
, DWORD
* pcbData
)
35 return ERROR_INVALID_FUNCTION
;
39 _RpcEnumPrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
, WCHAR
* pSubkey
, DWORD cbSubkey
, DWORD
* pcbSubkey
)
42 return ERROR_INVALID_FUNCTION
;
46 _RpcEnumPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
, BYTE
* pEnumValues
, DWORD cbEnumValues
, DWORD
* pcbEnumValues
, DWORD
* pnEnumValues
)
49 return ERROR_INVALID_FUNCTION
;
53 _RpcGetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter
, WCHAR
* pValueName
, DWORD
* pType
, BYTE
* pData
, DWORD nSize
, DWORD
* pcbNeeded
)
55 return _RpcGetPrinterDataEx(hPrinter
, L
"PrinterDriverData", pValueName
, pType
, pData
, nSize
, pcbNeeded
);
59 _RpcGetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
, const WCHAR
* pValueName
, DWORD
* pType
, BYTE
* pData
, DWORD nSize
, DWORD
* pcbNeeded
)
63 dwErrorCode
= RpcImpersonateClient(NULL
);
64 if (dwErrorCode
!= ERROR_SUCCESS
)
66 ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode
);
70 dwErrorCode
= GetPrinterDataExW(hPrinter
, pKeyName
, pValueName
, pType
, pData
, nSize
, pcbNeeded
);
78 _RpcSetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter
, WCHAR
* pValueName
, DWORD Type
, BYTE
* pData
, DWORD cbData
)
80 return _RpcSetPrinterDataEx(hPrinter
, L
"PrinterDriverData", pValueName
, Type
, pData
, cbData
);
84 _RpcSetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter
, const WCHAR
* pKeyName
, const WCHAR
* pValueName
, DWORD Type
, BYTE
* pData
, DWORD cbData
)
88 dwErrorCode
= RpcImpersonateClient(NULL
);
89 if (dwErrorCode
!= ERROR_SUCCESS
)
91 ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode
);
95 dwErrorCode
= SetPrinterDataExW(hPrinter
, pKeyName
, pValueName
, Type
, pData
, cbData
);