ReactOS  0.4.15-dev-499-g1f31905
init.c File Reference
#include "precomp.h"
Include dependency graph for init.c:

Go to the source code of this file.

Functions

DWORD _RpcSpoolerInit (VOID)
 

Function Documentation

◆ _RpcSpoolerInit()

DWORD _RpcSpoolerInit ( VOID  )

Definition at line 11 of file init.c.

12 {
13  DWORD dwErrorCode;
14 
15  // Call SpoolerInit in the security context of the client.
16  // This delay-loads spoolss.dll in the user context and all further calls to functions in spoolss.dll will be done in the user context as well.
17  dwErrorCode = RpcImpersonateClient(NULL);
18  if (dwErrorCode != ERROR_SUCCESS)
19  {
20  ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
21  return dwErrorCode;
22  }
23 
24  if (!SpoolerInit())
25  dwErrorCode = GetLastError();
26 
28  return dwErrorCode;
29 }
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
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
BOOL WINAPI SpoolerInit(VOID)
Definition: main.c:248

Referenced by pointer_default(), and SpoolerInit().