ReactOS 0.4.15-dev-7918-g2a2556c
printproviders.c File Reference
#include "precomp.h"
Include dependency graph for printproviders.c:

Go to the source code of this file.

Functions

DWORD _RpcAddPrintProvidor (WINSPOOL_HANDLE pName, WINSPOOL_PROVIDOR_CONTAINER *pProvidorContainer)
 
DWORD _RpcDeletePrintProvidor (WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPrintProviderName)
 

Function Documentation

◆ _RpcAddPrintProvidor()

DWORD _RpcAddPrintProvidor ( WINSPOOL_HANDLE  pName,
WINSPOOL_PROVIDOR_CONTAINER pProvidorContainer 
)

Definition at line 11 of file printproviders.c.

12{
13 DWORD dwErrorCode;
14
15 dwErrorCode = RpcImpersonateClient(NULL);
16 if (dwErrorCode != ERROR_SUCCESS)
17 {
18 ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
19 return dwErrorCode;
20 }
21
22 if (!AddPrintProvidorW(pName, pProvidorContainer->Level, (PBYTE)pProvidorContainer->ProvidorInfo.pProvidorInfo1))
23 dwErrorCode = GetLastError();
24
26 return dwErrorCode;
27
28}
#define ERR(fmt,...)
Definition: debug.h:110
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPSTR pName
Definition: security.c:75
BYTE * PBYTE
Definition: pedump.c:66
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1463
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1056
WINSPOOL_PROVIDOR_INFO_1 * pProvidorInfo1
Definition: winspool.idl:727
union _WINSPOOL_PROVIDOR_CONTAINER::@3447 ProvidorInfo
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
WINBOOL WINAPI AddPrintProvidorW(LPWSTR pName, DWORD level, LPBYTE pProvidorInfo)

Referenced by AddPrintProvidorW(), and pointer_default().

◆ _RpcDeletePrintProvidor()

DWORD _RpcDeletePrintProvidor ( WINSPOOL_HANDLE  pName,
WCHAR pEnvironment,
WCHAR pPrintProviderName 
)

Definition at line 31 of file printproviders.c.

32{
33 DWORD dwErrorCode;
34
35 dwErrorCode = RpcImpersonateClient(NULL);
36 if (dwErrorCode != ERROR_SUCCESS)
37 {
38 ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
39 return dwErrorCode;
40 }
41
42 if (!DeletePrintProvidorW(pName, pEnvironment, pPrintProviderName))
43 dwErrorCode = GetLastError();
44
46 return dwErrorCode;
47}
WINBOOL WINAPI DeletePrintProvidorW(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pPrintProvidorName)

Referenced by DeletePrintProvidorW(), and pointer_default().