-/* $Id: $\r
- *\r
- * init.c - VMS Enviroment Subsystem Server - Initialization\r
- * \r
- * ReactOS Operating System\r
- * \r
- * --------------------------------------------------------------------\r
- *\r
- * This software is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License as\r
- * published by the Free Software Foundation; either version 2 of the\r
- * License, or (at your option) any later version.\r
- *\r
- * This software is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this software; see the file COPYING.LIB. If not, write\r
- * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,\r
- * MA 02139, USA. \r
- *\r
- * --------------------------------------------------------------------\r
- */\r
-#define __USE_NT_LPC__\r
-#include "vmsss.h"\r
-\r
-//#define NDEBUG\r
-#include <debug.h>\r
-\r
-\r
-/**********************************************************************\r
- * NAME PRIVATE\r
- * VmspCreatePort/1\r
- */\r
-NTSTATUS VmsRunServer (VOID)\r
-{\r
- NTSTATUS Status = STATUS_SUCCESS;\r
- LPC_MAX_MESSAGE Request;\r
- PLPC_MESSAGE Reply = NULL;\r
- ULONG MessageType = 0;\r
-\r
- while (TRUE)\r
- {\r
- Status = NtReplyWaitReceivePort (VmsApiPort,\r
- 0,\r
- Reply,\r
- & Request);\r
- if(NT_SUCCESS(Status))\r
- {\r
- MessageType = PORT_MESSAGE_TYPE(Request);\r
- DPRINT("VMS: %s received a message (Type=%d)\n",\r
- __FUNCTION__, MessageType);\r
- switch(MessageType)\r
- {\r
- default:\r
- continue;\r
- }\r
- }else{\r
- DPRINT("VMS: %s: NtReplyWaitReceivePort failed (Status=%08lx)\n",\r
- __FUNCTION__, Status);\r
- }\r
- }\r
- return Status;\r
-}\r
-\r
-/* EOF */\r
+/* $Id$
+ *
+ * server.c - VMS Enviroment Subsystem Server - Initialization
+ *
+ * ReactOS Operating System
+ *
+ * --------------------------------------------------------------------
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.LIB. If not, write
+ * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+ * MA 02139, USA.
+ *
+ * --------------------------------------------------------------------
+ */
+#include "vmssrv.h"
+
+//#define NDEBUG
+#include <debug.h>
+
+HANDLE VmsApiPort = NULL;
+
+/**********************************************************************
+ * NAME PRIVATE
+ * VmsApiNull/2
+ */
+NTSTATUS NTAPI VmsApiNull (IN OUT PCSR_API_MESSAGE ApiMessage,
+ IN OUT PULONG Reply)
+{
+ DPRINT("VMSSRV: %s called\n", __FUNCTION__);
+
+ *Reply = 0;
+ return STATUS_SUCCESS;
+}
+
+PCSR_API_ROUTINE VmsServerApiDispatchTable [1] =
+{
+ VmsApiNull
+};
+
+BOOLEAN VmsServerApiValidTable [1] =
+{
+ TRUE
+};
+
+PCHAR VmsServerApiNameTable [1] =
+{
+ "Null",
+};
+
+/*=====================================================================
+ * PUBLIC API
+ *===================================================================*/
+
+NTSTATUS NTAPI ServerDllInitialization (PCSR_SERVER_DLL LoadedServerDll)
+{
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ DPRINT("VMSSRV: %s called\n", __FUNCTION__);
+
+ // Get the listening port from csrsrv.dll
+ VmsApiPort = CsrQueryApiPort ();
+ if (NULL == VmsApiPort)
+ {
+ Status = STATUS_UNSUCCESSFUL;
+ } else {
+ // Set CSR information
+ LoadedServerDll->ApiBase = 0;
+ LoadedServerDll->HighestApiSupported = 0;
+ LoadedServerDll->DispatchTable = VmsServerApiDispatchTable;
+ LoadedServerDll->ValidTable = VmsServerApiValidTable;
+ LoadedServerDll->NameTable = VmsServerApiNameTable;
+ LoadedServerDll->SizeOfProcessData = 0;
+ LoadedServerDll->ConnectCallback = NULL;
+ LoadedServerDll->DisconnectCallback = NULL;
+ }
+ return Status;
+}
+
+/* EOF */