Patch by Jonathon Wilson:
[reactos.git] / reactos / services / rpcss / rpcss.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /* $Id: rpcss.c,v 1.4 2003/11/14 17:13:32 weiden Exp $
20 *
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * FILE: services/rpcss/rpcss.c
24 * PURPOSE: RPC server
25 * PROGRAMMER: Eric Kohl
26 */
27
28 /* INCLUDES *****************************************************************/
29
30 #define UNICODE
31
32 #define NTOS_MODE_USER
33 #include <ntos.h>
34 #include <windows.h>
35 #include <stdio.h>
36 #include "rpcss.h"
37
38 //#include "services.h"
39
40 #define NDEBUG
41 #include <debug.h>
42
43
44
45 /* GLOBALS ******************************************************************/
46
47
48
49 /* FUNCTIONS *****************************************************************/
50
51 void
52 PrintString(char* fmt,...)
53 {
54 char buffer[512];
55 va_list ap;
56
57 va_start(ap, fmt);
58 vsprintf(buffer, fmt, ap);
59 va_end(ap);
60
61 OutputDebugStringA(buffer);
62 }
63
64
65
66 VOID CALLBACK
67 ServiceMain(DWORD argc, LPTSTR *argv)
68 {
69
70 PrintString("ServiceMain() called\n");
71
72
73 StartEndpointMapper();
74
75
76 PrintString("ServiceMain() done\n");
77
78 }
79
80
81 int main(int argc, char *argv[])
82 {
83 #if 0
84 SERVICE_TABLE_ENTRY ServiceTable[] = {{"RpcSs", ServiceMain},{NULL, NULL}};
85 #endif
86
87 HANDLE hEvent;
88
89 PrintString("RpcSs service\n");
90
91
92
93
94 #if 0
95 StartServiceCtrlDispatcher(ServiceTable);
96 #endif
97
98
99 ServiceMain(0, NULL);
100
101
102 hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
103 WaitForSingleObject(hEvent, INFINITE);
104
105 PrintString("EventLog: done\n");
106
107 ExitThread(0);
108 return(0);
109 }
110
111 /* EOF */