CSR: Wrong event and wrong place for mu.

svn path=/trunk/; revision=13761
This commit is contained in:
Emanuele Aliberti 2005-02-26 23:21:58 +00:00
parent 57b7d1bf18
commit 0cd607f519
7 changed files with 10 additions and 168 deletions

View file

@ -147,10 +147,10 @@ CsrpFreeCommandLine (HANDLE ProcessHeap,
/**********************************************************************
* NAME PRIVATE
* CsrpOpenKeInitDoneEvent/0
* CsrpOpenSmInitDoneEvent/0
*/
static NTSTATUS STDCALL
CsrpOpenKeInitDoneEvent (PHANDLE CsrssInitEvent)
CsrpOpenSmInitDoneEvent (PHANDLE CsrssInitEvent)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING EventName;
@ -194,13 +194,13 @@ VOID STDCALL NtProcessStartup(PPEB Peb)
Status);
}
/*
* Open the Ke notification event to notify we are OK after
* Open the SM notification event to notify we are OK after
* subsystem server initialization.
*/
Status = CsrpOpenKeInitDoneEvent(& CsrssInitEvent);
Status = CsrpOpenSmInitDoneEvent(& CsrssInitEvent);
if (!NT_SUCCESS(Status))
{
DbgPrint("CSR: CsrpOpenKeInitDoneEvent failed (Status=0x%08lx)\n",
DbgPrint("CSR: CsrpOpenSmInitDoneEvent failed (Status=0x%08lx)\n",
Status);
}
/*==================================================================
@ -209,10 +209,11 @@ VOID STDCALL NtProcessStartup(PPEB Peb)
if (CsrServerInitialization (CmdLineArg.Count, CmdLineArg.Vector) == TRUE)
{
/*=============================================================
* Tell Ke we are up and safe. If we fail to notify Ke, it will
* bugcheck the system with SESSION5_INITIALIZATION_FAILED.
* TODO: choose a better way to check user mode initialization
* is OK.
* Tell SM we are up and safe. If we fail to notify SM, it will
* die and the kernel will bugcheck with
* SESSION5_INITIALIZATION_FAILED.
* TODO: this won't be necessary, because CSR will call SM
* API SM_SESSION_COMPLETE.
*===========================================================*/
NtSetEvent (CsrssInitEvent, NULL);

View file

@ -1,28 +0,0 @@
# $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

View file

@ -1,37 +0,0 @@
/* $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 */

View file

@ -1,85 +0,0 @@
/* $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 */

View file

@ -1,4 +0,0 @@
; $Id: $
LIBRARY win32mu.dll
EXPORTS
ServerDllInitialization@20

View file

@ -1,5 +0,0 @@
#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>