335f1c132a6345868c390b7c0cd3523f98c67e37
[reactos.git] / vms / server / server.c
1 /* $Id$
2 *
3 * server.c - VMS Enviroment Subsystem Server - Initialization
4 *
5 * ReactOS Operating System
6 *
7 * --------------------------------------------------------------------
8 *
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING.LIB. If not, write
21 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
22 * MA 02139, USA.
23 *
24 * --------------------------------------------------------------------
25 */
26 #include "vmssrv.h"
27
28 //#define NDEBUG
29 #include <debug.h>
30
31 HANDLE VmsApiPort = NULL;
32
33 /**********************************************************************
34 * NAME PRIVATE
35 * VmspCreatePort/1
36 */
37 NTSTATUS VmsStaticServerThread (PVOID x)
38 {
39 NTSTATUS Status = STATUS_SUCCESS;
40 LPC_MAX_MESSAGE Request;
41 PPORT_MESSAGE Reply = NULL;
42 ULONG MessageType = 0;
43
44 while (TRUE)
45 {
46 Status = NtReplyWaitReceivePort (VmsApiPort,
47 0,
48 Reply,
49 (PPORT_MESSAGE) & Request);
50 if(NT_SUCCESS(Status))
51 {
52 MessageType = Request.Header.u2.s2.Type;
53 DPRINT("VMS: %s received a message (Type=%d)\n",
54 __FUNCTION__, MessageType);
55 switch(MessageType)
56 {
57 default:
58 continue;
59 }
60 }else{
61 DPRINT("VMS: %s: NtReplyWaitReceivePort failed (Status=%08lx)\n",
62 __FUNCTION__, Status);
63 }
64 }
65 return Status;
66 }
67
68 /*=====================================================================
69 * PUBLIC API
70 *===================================================================*/
71
72 NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount,
73 LPWSTR *Argument)
74 {
75 return CsrAddStaticServerThread ();
76 }
77
78 /* EOF */