ReactOS  0.4.15-dev-341-g17c5fb8
printerdata.c File Reference
#include "precomp.h"
Include dependency graph for printerdata.c:

Go to the source code of this file.

Functions

DWORD _RpcDeletePrinterData (WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName)
 
DWORD _RpcDeletePrinterDataEx (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName)
 
DWORD _RpcDeletePrinterKey (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName)
 
DWORD _RpcEnumPrinterData (WINSPOOL_PRINTER_HANDLE hPrinter, DWORD dwIndex, WCHAR *pValueName, DWORD cbValueName, DWORD *pcbValueName, DWORD *pType, BYTE *pData, DWORD cbData, DWORD *pcbData)
 
DWORD _RpcEnumPrinterKey (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, WCHAR *pSubkey, DWORD cbSubkey, DWORD *pcbSubkey)
 
DWORD _RpcEnumPrinterDataEx (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, BYTE *pEnumValues, DWORD cbEnumValues, DWORD *pcbEnumValues, DWORD *pnEnumValues)
 
DWORD _RpcGetPrinterData (WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName, DWORD *pType, BYTE *pData, DWORD nSize, DWORD *pcbNeeded)
 
DWORD _RpcGetPrinterDataEx (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD *pType, BYTE *pData, DWORD nSize, DWORD *pcbNeeded)
 
DWORD _RpcSetPrinterData (WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName, DWORD Type, BYTE *pData, DWORD cbData)
 
DWORD _RpcSetPrinterDataEx (WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD Type, BYTE *pData, DWORD cbData)
 

Function Documentation

◆ _RpcDeletePrinterData()

DWORD _RpcDeletePrinterData ( WINSPOOL_PRINTER_HANDLE  hPrinter,
WCHAR pValueName 
)

Definition at line 11 of file printerdata.c.

12 {
15 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcDeletePrinterDataEx()

DWORD _RpcDeletePrinterDataEx ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName,
const WCHAR pValueName 
)

Definition at line 18 of file printerdata.c.

19 {
22 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcDeletePrinterKey()

DWORD _RpcDeletePrinterKey ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName 
)

Definition at line 25 of file printerdata.c.

26 {
29 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcEnumPrinterData()

DWORD _RpcEnumPrinterData ( WINSPOOL_PRINTER_HANDLE  hPrinter,
DWORD  dwIndex,
WCHAR pValueName,
DWORD  cbValueName,
DWORD pcbValueName,
DWORD pType,
BYTE pData,
DWORD  cbData,
DWORD pcbData 
)

Definition at line 32 of file printerdata.c.

33 {
36 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcEnumPrinterDataEx()

DWORD _RpcEnumPrinterDataEx ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName,
BYTE pEnumValues,
DWORD  cbEnumValues,
DWORD pcbEnumValues,
DWORD pnEnumValues 
)

Definition at line 46 of file printerdata.c.

47 {
50 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcEnumPrinterKey()

DWORD _RpcEnumPrinterKey ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName,
WCHAR pSubkey,
DWORD  cbSubkey,
DWORD pcbSubkey 
)

Definition at line 39 of file printerdata.c.

40 {
43 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by pointer_default().

◆ _RpcGetPrinterData()

DWORD _RpcGetPrinterData ( WINSPOOL_PRINTER_HANDLE  hPrinter,
WCHAR pValueName,
DWORD pType,
BYTE pData,
DWORD  nSize,
DWORD pcbNeeded 
)

Definition at line 53 of file printerdata.c.

54 {
55  return _RpcGetPrinterDataEx(hPrinter, L"PrinterDriverData", pValueName, pType, pData, nSize, pcbNeeded);
56 }
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2037
static const WCHAR L[]
Definition: oid.c:1250
DWORD _RpcGetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD *pType, BYTE *pData, DWORD nSize, DWORD *pcbNeeded)
Definition: printerdata.c:59
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3827
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by pointer_default().

◆ _RpcGetPrinterDataEx()

DWORD _RpcGetPrinterDataEx ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName,
const WCHAR pValueName,
DWORD pType,
BYTE pData,
DWORD  nSize,
DWORD pcbNeeded 
)

Definition at line 59 of file printerdata.c.

60 {
61  DWORD dwErrorCode;
62 
63  dwErrorCode = RpcImpersonateClient(NULL);
64  if (dwErrorCode != ERROR_SUCCESS)
65  {
66  ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
67  return dwErrorCode;
68  }
69 
70  dwErrorCode = GetPrinterDataExW(hPrinter, pKeyName, pValueName, pType, pData, nSize, pcbNeeded);
71 
73 
74  return dwErrorCode;
75 }
#define ERROR_SUCCESS
Definition: deptool.c:10
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2037
DWORD WINAPI GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded)
Definition: printerdata.c:11
smooth NULL
Definition: ftsmooth.c:416
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1459
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:110
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3827
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1052
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by _RpcGetPrinterData(), GetPrinterDataExW(), and pointer_default().

◆ _RpcSetPrinterData()

DWORD _RpcSetPrinterData ( WINSPOOL_PRINTER_HANDLE  hPrinter,
WCHAR pValueName,
DWORD  Type,
BYTE pData,
DWORD  cbData 
)

Definition at line 78 of file printerdata.c.

79 {
80  return _RpcSetPrinterDataEx(hPrinter, L"PrinterDriverData", pValueName, Type, pData, cbData);
81 }
Type
Definition: Type.h:6
DWORD _RpcSetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD Type, BYTE *pData, DWORD cbData)
Definition: printerdata.c:84
static const WCHAR L[]
Definition: oid.c:1250
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by pointer_default().

◆ _RpcSetPrinterDataEx()

DWORD _RpcSetPrinterDataEx ( WINSPOOL_PRINTER_HANDLE  hPrinter,
const WCHAR pKeyName,
const WCHAR pValueName,
DWORD  Type,
BYTE pData,
DWORD  cbData 
)

Definition at line 84 of file printerdata.c.

85 {
86  DWORD dwErrorCode;
87 
88  dwErrorCode = RpcImpersonateClient(NULL);
89  if (dwErrorCode != ERROR_SUCCESS)
90  {
91  ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
92  return dwErrorCode;
93  }
94 
95  dwErrorCode = SetPrinterDataExW(hPrinter, pKeyName, pValueName, Type, pData, cbData);
96 
98 
99  return dwErrorCode;
100 }
DWORD WINAPI SetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData)
Definition: printerdata.c:38
Type
Definition: Type.h:6
#define ERROR_SUCCESS
Definition: deptool.c:10
smooth NULL
Definition: ftsmooth.c:416
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1459
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:110
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1052
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by _RpcSetPrinterData(), pointer_default(), and SetPrinterDataExW().