Multiuser Win32: empty server dll
Added: trunk/reactos/subsys/csrss/win32mu/
Added: trunk/reactos/subsys/csrss/win32mu/Makefile
Added: trunk/reactos/subsys/csrss/win32mu/dllmain.c
Added: trunk/reactos/subsys/csrss/win32mu/init.c
Added: trunk/reactos/subsys/csrss/win32mu/w32mu.h
Added: trunk/reactos/subsys/csrss/win32mu/win32mu.def
Added: trunk/reactos/subsys/csrss/win32mu/win32mu.rc

Added: trunk/reactos/subsys/csrss/win32mu/Makefile
--- trunk/reactos/subsys/csrss/win32mu/Makefile	2005-02-26 15:15:11 UTC (rev 13750)
+++ trunk/reactos/subsys/csrss/win32mu/Makefile	2005-02-26 15:17:54 UTC (rev 13751)
@@ -0,0 +1,28 @@
+# $Id:  $
+
+PATH_TO_TOP = ../../..
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = win32mu
+
+TARGET_BASE = 0x5ffb0000
+
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -D__USE_W32API -D_DISABLE_TIDENTS -Wall -Werror -I../include
+
+TARGET_LFLAGS = -nostartfiles -nostdlib
+
+TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a
+
+TARGET_OBJECTS = dllmain.o init.o
+
+TARGET_ENTRY = _DllMain@12
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk

Added: trunk/reactos/subsys/csrss/win32mu/dllmain.c
--- trunk/reactos/subsys/csrss/win32mu/dllmain.c	2005-02-26 15:15:11 UTC (rev 13750)
+++ trunk/reactos/subsys/csrss/win32mu/dllmain.c	2005-02-26 15:17:54 UTC (rev 13751)
@@ -0,0 +1,37 @@
+/* $Id: $
+ *
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS system libraries
+ * FILE:            subsys/csrss/win32csr/dllmain.c
+ * PURPOSE:         Initialization 
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <windows.h>
+#include "csrplugin.h"
+
+#define NDEBUG
+#include <debug.h>
+
+
+/* GLOBALS *******************************************************************/
+
+HINSTANCE DllHandle = (HINSTANCE) 0;
+
+/* FUNCTIONS *****************************************************************/
+
+BOOL STDCALL
+DllMain(HANDLE hDll,
+	DWORD dwReason,
+	LPVOID lpReserved)
+{
+  if (DLL_PROCESS_ATTACH == dwReason)
+    {
+      DllHandle = hDll;
+    }
+
+  return TRUE;
+}
+
+/* EOF */

Added: trunk/reactos/subsys/csrss/win32mu/init.c
--- trunk/reactos/subsys/csrss/win32mu/init.c	2005-02-26 15:15:11 UTC (rev 13750)
+++ trunk/reactos/subsys/csrss/win32mu/init.c	2005-02-26 15:17:54 UTC (rev 13751)
@@ -0,0 +1,85 @@
+/* $Id: $
+ *
+ * WIN32MU.DLL - init.c - Initialize the server DLL
+ * 
+ * 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 NTOS_MODE_USER
+#include <ntos.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#include "w32mu.h"
+
+static NTSTATUS STDCALL
+W32muLoadRemoteTerminalProxy (VOID)
+{
+	SYSTEM_LOAD_AND_CALL_IMAGE ImageInfo;
+	NTSTATUS                   Status = STATUS_SUCCESS;
+
+	DPRINT("W32MU: loading remote terminal device\n");
+ 
+	/* Load kernel mode module */
+	RtlInitUnicodeString (& ImageInfo.ModuleName,
+			      L"\\SystemRoot\\system32\\w32mut.sys");
+
+	Status = NtSetSystemInformation (SystemLoadAndCallImage,
+					 & ImageInfo,
+					 sizeof (SYSTEM_LOAD_AND_CALL_IMAGE));
+
+	DPRINT("W32MU: w32mut.sys loaded\n", Status);
+	if (!NT_SUCCESS(Status))
+	{
+		DPRINT("W32MU: loading w32mut.sys failed (Status=0x%08lx)\n", Status);
+		return Status;
+	}
+	return Status;
+}
+
+/* Public entry point for CSRSS.EXE to load us */
+
+NTSTATUS STDCALL
+ServerDllInitialization (int a0, int a1, int a2, int a3, int a4)
+{
+	NTSTATUS Status = STATUS_SUCCESS;
+	
+	/* TODO:
+	 * 1) load a kernel mode module to make Kmode happy
+	 *    (it will provide keyoard, display and pointer
+	 *    devices for window stations not attached to 
+	 *    the console);
+	 */
+	Status = W32muLoadRemoteTerminalProxy ();		
+	/*
+	 * 2) pick up from the registry the list of session
+	 *    access providers (SAP: Local, RFB, RDP, ICA, ...);
+	 * 3) initialize each SAP;
+	 * 4) on SAP events, provide:
+	 *    4.1) create session (SESSION->new);
+	 *    4.2) suspend session (SESSION->state_change);
+	 *    4.3) destroy session (SESSION->delete).
+	 */
+	return Status;
+}
+
+/* EOF */

Added: trunk/reactos/subsys/csrss/win32mu/w32mu.h
Added: trunk/reactos/subsys/csrss/win32mu/win32mu.def
--- trunk/reactos/subsys/csrss/win32mu/win32mu.def	2005-02-26 15:15:11 UTC (rev 13750)
+++ trunk/reactos/subsys/csrss/win32mu/win32mu.def	2005-02-26 15:17:54 UTC (rev 13751)
@@ -0,0 +1,4 @@
+; $Id:  $
+LIBRARY win32mu.dll
+EXPORTS
+ServerDllInitialization@20

Added: trunk/reactos/subsys/csrss/win32mu/win32mu.rc
--- trunk/reactos/subsys/csrss/win32mu/win32mu.rc	2005-02-26 15:15:11 UTC (rev 13750)
+++ trunk/reactos/subsys/csrss/win32mu/win32mu.rc	2005-02-26 15:17:54 UTC (rev 13751)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION	"ReactOS/Win32 Multiuser Server\0"
+#define REACTOS_STR_INTERNAL_NAME	"win32mu\0"
+#define REACTOS_STR_ORIGINAL_FILENAME	"win32mu.dll\0"
+#include <reactos/version.rc>