3 * server.c - VMS Enviroment Subsystem Server - Initialization
5 * ReactOS Operating System
7 * --------------------------------------------------------------------
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.
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.
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,
24 * --------------------------------------------------------------------
31 HANDLE VmsApiPort
= NULL
;
33 /**********************************************************************
35 * VmsStaticServerThread/1
37 VOID STDCALL
VmsStaticServerThread (PVOID x
)
39 NTSTATUS Status
= STATUS_SUCCESS
;
40 PPORT_MESSAGE Request
= (PPORT_MESSAGE
) x
;
41 PPORT_MESSAGE Reply
= NULL
;
42 ULONG MessageType
= 0;
44 DPRINT("VMSSRV: %s called\n", __FUNCTION__
);
46 MessageType
= Request
->u2
.s2
.Type
;
47 DPRINT("VMSSRV: %s received a message (Type=%d)\n",
48 __FUNCTION__
, MessageType
);
53 Status
= NtReplyPort (VmsApiPort
, Reply
);
58 /*=====================================================================
60 *===================================================================*/
62 NTSTATUS STDCALL
ServerDllInitialization (ULONG ArgumentCount
,
65 NTSTATUS Status
= STATUS_SUCCESS
;
67 DPRINT("VMSSRV: %s called\n", __FUNCTION__
);
69 // Get the listening port from csrsrv.dll
70 VmsApiPort
= CsrQueryApiPort ();
71 if (NULL
== VmsApiPort
)
73 return STATUS_UNSUCCESSFUL
;
75 // Register our message dispatcher
76 Status
= CsrAddStaticServerThread (VmsStaticServerThread
);
77 if (NT_SUCCESS(Status
))
79 //TODO: perform the real VMS server internal initialization here