X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=vms%2Fserver%2Fserver.c;h=3ef07e8a44a5164dbfbd2d126f6d3e55a0ecfbf8;hp=eb49b14deaac4bb623f4df55dc73cdd7ad82b4e9;hb=901929a78711583e331863949bb1b20c7bb3d8b9;hpb=143f5e1f74b16fdc120e312305290a318ea26271 diff --git a/vms/server/server.c b/vms/server/server.c index eb49b14deaa..3ef07e8a44a 100644 --- a/vms/server/server.c +++ b/vms/server/server.c @@ -1,68 +1,90 @@ -/* $Id: $ - * - * init.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. - * - * -------------------------------------------------------------------- - */ -#define __USE_NT_LPC__ -#include "vmsss.h" - -//#define NDEBUG -#include - - -/********************************************************************** - * NAME PRIVATE - * VmspCreatePort/1 - */ -NTSTATUS VmsRunServer (VOID) -{ - NTSTATUS Status = STATUS_SUCCESS; - LPC_MAX_MESSAGE Request; - PLPC_MESSAGE Reply = NULL; - ULONG MessageType = 0; - - while (TRUE) - { - Status = NtReplyWaitReceivePort (VmsApiPort, - 0, - Reply, - & Request); - if(NT_SUCCESS(Status)) - { - MessageType = PORT_MESSAGE_TYPE(Request); - DPRINT("VMS: %s received a message (Type=%d)\n", - __FUNCTION__, MessageType); - switch(MessageType) - { - default: - continue; - } - }else{ - DPRINT("VMS: %s: NtReplyWaitReceivePort failed (Status=%08lx)\n", - __FUNCTION__, Status); - } - } - return Status; -} - -/* EOF */ +/* $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 + +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 */