fad5100c3fc79ce1fe41146fff55106cabb5db03
[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 DWORD
39 _RpcEnumPrinters(DWORD Flags, WINSPOOL_HANDLE Name, DWORD Level, BYTE* pPrinterEnum, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
40 {
41 return 0;
42 }
43
44 DWORD
45 _RpcOpenPrinter(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE* phPrinter, WCHAR* pDatatype, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, DWORD AccessRequired)
46 {
47 return 0;
48 }
49
50 void __RPC_FAR* __RPC_USER
51 midl_user_allocate(SIZE_T len)
52 {
53 return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
54 }
55
56 void __RPC_USER
57 midl_user_free(void __RPC_FAR* ptr)
58 {
59 HeapFree(GetProcessHeap(), 0, ptr);
60 }
61
62 void __RPC_USER
63 WINSPOOL_PRINTER_HANDLE_rundown(WINSPOOL_PRINTER_HANDLE hPrinter)
64 {
65 }