[CONSRV/WINSRV]
[reactos.git] / win32ss / user / winsrv / server.c
index 8e0063e..e536afd 100644 (file)
@@ -1,31 +1,43 @@
-/* $Id$
- *
- * server.c - ReactOS/Win32 Console+User Enviroment Subsystem Server - Initialization
- *
- * ReactOS Operating System
- *
- * --------------------------------------------------------------------
- *
- * This program 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 program 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 program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * --------------------------------------------------------------------
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS User API Server DLL
+ * FILE:            win32ss/user/winsrv/server.c
+ * PURPOSE:         Server APIs
+ * PROGRAMMERS:     Eric Kohl
+ *                  Hermes Belusca-Maito (hermes.belusca@sfr.fr)
  */
+
+/* INCLUDES ******************************************************************/
+
 #include "winsrv.h"
 
-//#define NDEBUG
+#define NDEBUG
 #include <debug.h>
 
 
+/* GLOBALS *******************************************************************/
+
+static BOOLEAN ServicesProcessIdValid = FALSE;
+static ULONG_PTR ServicesProcessId;
+
+
+/* FUNCTIONS *****************************************************************/
+
+CSR_API(SrvRegisterServicesProcess)
+{
+    PCSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest = &((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterServicesProcessRequest;
+
+    if (ServicesProcessIdValid == TRUE)
+    {
+        /* Only accept a single call */
+        return STATUS_INVALID_PARAMETER;
+    }
+    else
+    {
+        ServicesProcessId = (ULONG_PTR)RegisterServicesProcessRequest->ProcessId;
+        ServicesProcessIdValid = TRUE;
+        return STATUS_SUCCESS;
+    }
+}
+
 /* EOF */