mirror of
https://github.com/reactos/reactos.git
synced 2024-08-26 13:18:51 +00:00
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
/*
|
|
* PROJECT: ReactOS Print Spooler Service
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
* PURPOSE: RPC Server Thread
|
|
* COPYRIGHT: Copyright 2015 Colin Finck (colin@reactos.org)
|
|
*/
|
|
|
|
#include "precomp.h"
|
|
|
|
DWORD WINAPI
|
|
LrpcThreadProc(LPVOID lpParameter)
|
|
{
|
|
RPC_STATUS Status;
|
|
|
|
Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"spoolss", NULL);
|
|
if (Status != RPC_S_OK)
|
|
{
|
|
ERR("RpcServerUseProtseqEpW failed with status %ld!\n", Status);
|
|
return 0;
|
|
}
|
|
|
|
Status = RpcServerRegisterIf(winspool_v1_0_s_ifspec, NULL, NULL);
|
|
if (Status != RPC_S_OK)
|
|
{
|
|
ERR("RpcServerRegisterIf failed with status %ld!\n", Status);
|
|
return 0;
|
|
}
|
|
|
|
Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, 0);
|
|
if (Status != RPC_S_OK)
|
|
{
|
|
ERR("RpcServerListen() failed with status %ld!\n", Status);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
void __RPC_FAR* __RPC_USER
|
|
midl_user_allocate(SIZE_T len)
|
|
{
|
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
}
|
|
|
|
void __RPC_USER
|
|
midl_user_free(void __RPC_FAR* ptr)
|
|
{
|
|
HeapFree(GetProcessHeap(), 0, ptr);
|
|
}
|
|
|
|
void __RPC_USER
|
|
WINSPOOL_GDI_HANDLE_rundown(WINSPOOL_GDI_HANDLE hGdiHandle)
|
|
{
|
|
}
|
|
|
|
void __RPC_USER
|
|
WINSPOOL_PRINTER_HANDLE_rundown(WINSPOOL_PRINTER_HANDLE hPrinter)
|
|
{
|
|
}
|