- Add a dummy winspool.drv SpoolerInit doing an RPC call to a dummy RpcSpoolerInit...
[reactos.git] / reactos / win32ss / printing / base / spoolsv / rpcserver.c
1 /*
2 * PROJECT: ReactOS Print Spooler Service
3 * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
4 * PURPOSE: RPC Server Thread
5 * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
6 */
7
8 #include "precomp.h"
9
10 DWORD WINAPI
11 RpcThreadProc(LPVOID lpParameter)
12 {
13 RPC_STATUS Status;
14
15 Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\spoolss", NULL);
16 if (Status != RPC_S_OK)
17 {
18 ERR("RpcServerUseProtseqEpW failed with status %u!\n", Status);
19 return 0;
20 }
21
22 Status = RpcServerRegisterIf(winspool_v1_0_s_ifspec, NULL, NULL);
23 if (Status != RPC_S_OK)
24 {
25 ERR("RpcServerRegisterIf failed with status %u!\n", Status);
26 return 0;
27 }
28
29 Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, 0);
30 if (Status != RPC_S_OK)
31 {
32 ERR("RpcServerListen() failed with status %u!\n", Status);
33 }
34
35 return 0;
36 }
37
38 void __RPC_FAR* __RPC_USER
39 midl_user_allocate(SIZE_T len)
40 {
41 return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
42 }
43
44 void __RPC_USER
45 midl_user_free(void __RPC_FAR* ptr)
46 {
47 HeapFree(GetProcessHeap(), 0, ptr);
48 }
49
50 void __RPC_USER
51 WINSPOOL_GDI_HANDLE_rundown(WINSPOOL_GDI_HANDLE hGdiHandle)
52 {
53 }
54
55 void __RPC_USER
56 WINSPOOL_PRINTER_HANDLE_rundown(WINSPOOL_PRINTER_HANDLE hPrinter)
57 {
58 }