ReactOS  0.4.15-dev-2091-gc14c9ca
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 ERROR_SUCCESS
Definition: deptool.c:10
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
BOOL WINAPI AddPrintProvidorW(PWSTR pName, DWORD Level, PBYTE pProviderInfo)
WINSPOOL_PROVIDOR_INFO_1 * pProvidorInfo1
Definition: winspool.idl:727
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1459
static LPSTR pName
Definition: security.c:75
unsigned long DWORD
Definition: ntddk_ex.h:95
union _WINSPOOL_PROVIDOR_CONTAINER::@3387 ProvidorInfo
#define ERR(fmt,...)
Definition: debug.h:110
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1052
#define NULL
Definition: types.h:112
BYTE * PBYTE
Definition: pedump.c:66

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 }
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1459
static LPSTR pName
Definition: security.c:75
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
#define NULL
Definition: types.h:112
BOOL WINAPI DeletePrintProvidorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPrintProviderName)

Referenced by DeletePrintProvidorW(), and pointer_default().