ReactOS 0.4.16-dev-297-gc569aee
printerdata.c File Reference
#include "precomp.h"
Include dependency graph for printerdata.c:

Go to the source code of this file.

Functions

DWORD WINAPI DeletePrinterDataExW (HANDLE hPrinter, PCWSTR pKeyName, PCWSTR pValueName)
 
DWORD WINAPI DeletePrinterDataW (HANDLE hPrinter, PWSTR pValueName)
 
DWORD WINAPI DeletePrinterKeyW (HANDLE hPrinter, PCWSTR pKeyName)
 
DWORD WINAPI EnumPrinterDataExW (HANDLE hPrinter, PCWSTR pKeyName, PBYTE pEnumValues, DWORD cbEnumValues, PDWORD pcbEnumValues, PDWORD pnEnumValues)
 
DWORD WINAPI EnumPrinterDataW (HANDLE hPrinter, DWORD dwIndex, PWSTR pValueName, DWORD cbValueName, PDWORD pcbValueName, PDWORD pType, PBYTE pData, DWORD cbData, PDWORD pcbData)
 
DWORD WINAPI EnumPrinterKeyW (HANDLE hPrinter, PCWSTR pKeyName, PWSTR pSubkey, DWORD cbSubkey, PDWORD pcbSubkey)
 
DWORD WINAPI GetPrinterDataExW (HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
 
DWORD WINAPI GetPrinterDataW (HANDLE hPrinter, LPWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
 
DWORD WINAPI SetPrinterDataExW (HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData)
 
DWORD WINAPI SetPrinterDataW (HANDLE hPrinter, PWSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
 

Function Documentation

◆ DeletePrinterDataExW()

DWORD WINAPI DeletePrinterDataExW ( HANDLE  hPrinter,
PCWSTR  pKeyName,
PCWSTR  pValueName 
)

Definition at line 11 of file printerdata.c.

12{
14
15 // Sanity checks.
16 if (!pHandle)
17 {
19 return FALSE;
20 }
21
22 return pHandle->pPrintProvider->PrintProvider.fpDeletePrinterDataEx(pHandle->hPrinter, pKeyName, pValueName);
23}
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
PSPOOLSS_PRINT_PROVIDER pPrintProvider
Definition: precomp.h:46
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
struct _SPOOLSS_PRINTER_HANDLE * PSPOOLSS_PRINTER_HANDLE

Referenced by DeletePrinterDataExA().

◆ DeletePrinterDataW()

DWORD WINAPI DeletePrinterDataW ( HANDLE  hPrinter,
PWSTR  pValueName 
)

Definition at line 26 of file printerdata.c.

27{
29
30 // Sanity checks.
31 if (!pHandle)
32 {
34 return FALSE;
35 }
36
37 return pHandle->pPrintProvider->PrintProvider.fpDeletePrinterData(pHandle->hPrinter, pValueName);
38}

Referenced by DeletePrinterDataA().

◆ DeletePrinterKeyW()

DWORD WINAPI DeletePrinterKeyW ( HANDLE  hPrinter,
PCWSTR  pKeyName 
)

Definition at line 41 of file printerdata.c.

42{
44
45 // Sanity checks.
46 if (!pHandle)
47 {
49 return FALSE;
50 }
51
52 return pHandle->pPrintProvider->PrintProvider.fpDeletePrinterKey(pHandle->hPrinter, pKeyName);
53}

Referenced by DeletePrinterKeyA().

◆ EnumPrinterDataExW()

DWORD WINAPI EnumPrinterDataExW ( HANDLE  hPrinter,
PCWSTR  pKeyName,
PBYTE  pEnumValues,
DWORD  cbEnumValues,
PDWORD  pcbEnumValues,
PDWORD  pnEnumValues 
)

Definition at line 56 of file printerdata.c.

57{
59
60 // Sanity checks.
61 if (!pHandle)
62 {
64 return FALSE;
65 }
66
67 return pHandle->pPrintProvider->PrintProvider.fpEnumPrinterDataEx(pHandle->hPrinter, pKeyName, pEnumValues, cbEnumValues, pcbEnumValues, pnEnumValues);
68}

Referenced by EnumPrinterDataExA().

◆ EnumPrinterDataW()

DWORD WINAPI EnumPrinterDataW ( HANDLE  hPrinter,
DWORD  dwIndex,
PWSTR  pValueName,
DWORD  cbValueName,
PDWORD  pcbValueName,
PDWORD  pType,
PBYTE  pData,
DWORD  cbData,
PDWORD  pcbData 
)

Definition at line 71 of file printerdata.c.

72{
74
75 // Sanity checks.
76 if (!pHandle)
77 {
79 return FALSE;
80 }
81
82 return pHandle->pPrintProvider->PrintProvider.fpEnumPrinterData(pHandle->hPrinter, dwIndex, pValueName, cbValueName, pcbValueName, pType, pData, cbData, pcbData);
83}
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4950

◆ EnumPrinterKeyW()

DWORD WINAPI EnumPrinterKeyW ( HANDLE  hPrinter,
PCWSTR  pKeyName,
PWSTR  pSubkey,
DWORD  cbSubkey,
PDWORD  pcbSubkey 
)

Definition at line 86 of file printerdata.c.

87{
89
90 // Sanity checks.
91 if (!pHandle)
92 {
94 return FALSE;
95 }
96
97 return pHandle->pPrintProvider->PrintProvider.fpEnumPrinterKey(pHandle->hPrinter, pKeyName, pSubkey, cbSubkey, pcbSubkey);
98}

◆ GetPrinterDataExW()

DWORD WINAPI GetPrinterDataExW ( HANDLE  hPrinter,
LPCWSTR  pKeyName,
LPCWSTR  pValueName,
LPDWORD  pType,
LPBYTE  pData,
DWORD  nSize,
LPDWORD  pcbNeeded 
)

Definition at line 101 of file printerdata.c.

102{
104
105 // Sanity check.
106 if (!pHandle)
107 {
108 // Yes, Windows checks for the handle here and sets the last error to ERROR_INVALID_HANDLE,
109 // but returns FALSE and not the error code.
111 return FALSE;
112 }
113
114 // Call GetPrinterDataEx of the Print Provider.
115 return pHandle->pPrintProvider->PrintProvider.fpGetPrinterDataEx(pHandle->hPrinter, pKeyName, pValueName, pType, pData, nSize, pcbNeeded);
116}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2109
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3828

Referenced by _RpcGetPrinterDataEx(), GetPrinterDataExA(), and GetPrinterDataW().

◆ GetPrinterDataW()

DWORD WINAPI GetPrinterDataW ( HANDLE  hPrinter,
LPWSTR  pValueName,
LPDWORD  pType,
LPBYTE  pData,
DWORD  nSize,
LPDWORD  pcbNeeded 
)

Definition at line 119 of file printerdata.c.

120{
121 // The ReactOS Printing Stack forwards all GetPrinterData calls to GetPrinterDataEx as soon as possible.
122 // This function may only be called if spoolss.dll is used together with Windows Printing Stack components.
123 WARN("This function should never be called!\n");
124 return GetPrinterDataExW(hPrinter, L"PrinterDriverData", pValueName, pType, pData, nSize, pcbNeeded);
125}
#define WARN(fmt,...)
Definition: precomp.h:61
DWORD WINAPI GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
Definition: printerdata.c:101
#define L(x)
Definition: ntvdm.h:50

◆ SetPrinterDataExW()

DWORD WINAPI SetPrinterDataExW ( HANDLE  hPrinter,
LPCWSTR  pKeyName,
LPCWSTR  pValueName,
DWORD  Type,
LPBYTE  pData,
DWORD  cbData 
)

Definition at line 128 of file printerdata.c.

129{
131
132 // Sanity check.
133 if (!pHandle)
134 {
135 // Yes, Windows checks for the handle here and sets the last error to ERROR_INVALID_HANDLE,
136 // but returns FALSE and not the error code.
138 return FALSE;
139 }
140
141 // Call SetPrinterDataEx of the Print Provider.
142 return pHandle->pPrintProvider->PrintProvider.fpSetPrinterDataEx(pHandle->hPrinter, pKeyName, pValueName, Type, pData, cbData);
143}
Type
Definition: Type.h:7

Referenced by _RpcSetPrinterDataEx(), SetPrinterDataExA(), and SetPrinterDataW().

◆ SetPrinterDataW()

DWORD WINAPI SetPrinterDataW ( HANDLE  hPrinter,
PWSTR  pValueName,
DWORD  Type,
PBYTE  pData,
DWORD  cbData 
)

Definition at line 146 of file printerdata.c.

147{
148 // The ReactOS Printing Stack forwards all SetPrinterData calls to SetPrinterDataEx as soon as possible.
149 // This function may only be called if spoolss.dll is used together with Windows Printing Stack components.
150 WARN("This function should never be called!\n");
151 return SetPrinterDataExW(hPrinter, L"PrinterDriverData", pValueName, Type, pData, cbData);
152}
DWORD WINAPI SetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData)
Definition: printerdata.c:128