Session manager skeleton

svn path=/trunk/; revision=529
This commit is contained in:
Emanuele Aliberti 1999-05-30 20:40:18 +00:00
parent 28f788e6ed
commit 380ae8a262
4 changed files with 216 additions and 0 deletions

View file

@ -0,0 +1,55 @@
/* $Id: init.c,v 1.1 1999/05/30 20:40:18 ea Exp $
*
* smss.c - Session Manager
*
* ReactOS Operating System
*
* --------------------------------------------------------------------
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library 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.
*
* --------------------------------------------------------------------
*
* 19990530 (Emanuele Aliberti)
* Compiled successfully with egcs 1.1.2
*/
#include <ddk/ntddk.h>
//#include <internal/lpc.h>
BOOL
InitSessionManager(
HANDLE Children[]
)
{
/* FIXME: Create the \SmApiPort object (LPC) */
/* FIXME: Create two thread for \SmApiPort */
/* FIXME: Create the system environment variables */
/* FIXME: Define symbolic links to kernel devices (MS-DOS names) */
/* FIXME: Create pagination files (if any) other than the first one */
/* FIXME: Load the well known DLLs */
/* FIXME: Load the kernel mode driver win32k.sys */
/* FIXME: Start the Win32 subsystem (csrss.exe) */
Children[0] = INVALID_HANDLE_VALUE;
/* FIXME: Start winlogon.exe */
Children[1] = INVALID_HANDLE_VALUE;
/* FIXME: Create the \DbgSsApiPort object (LPC) */
/* FIXME: Create the \DbgUiApiPort object (LPC) */
return FALSE;
}
/* EOF */

View file

@ -0,0 +1,36 @@
# $Id: makefile,v 1.1 1999/05/30 20:40:18 ea Exp $
#
# Session Manager
#
# ReactOS Operating System
#
TARGET=smss
OBJECTS = $(TARGET).o init.o $(TARGET).coff
LIBS = ../../lib/ntdll/ntdll.a
all: $(TARGET).exe
.phony: all
clean:
- $(RM) $(TARGET).o
- $(RM) $(TARGET).exe
- $(RM) $(TARGET).sym
- $(RM) $(TARGET).coff
.phony: clean
$(TARGET).coff: $(TARGET).rc
$(RC) $(TARGET).rc $(TARGET).coff
$(TARGET).exe: $(OBJECTS) $(LIBS)
$(LD) \
$(OBJECTS) \
$(LIBS) \
-o $(TARGET).exe \
--subsystem native
$(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
include ../../rules.mak

View file

@ -0,0 +1,87 @@
/* $Id: smss.c,v 1.1 1999/05/30 20:40:18 ea Exp $
*
* smss.c - Session Manager
*
* ReactOS Operating System
*
* --------------------------------------------------------------------
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library 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.
*
* --------------------------------------------------------------------
*
* 19990529 (Emanuele Aliberti)
* Compiled successfully with egcs 1.1.2
*/
#include <ddk/ntddk.h>
#include <wchar.h>
BOOL InitSessionManager(HANDLE Children[]); /* ./init.c */
void
DisplayString( LPCWSTR lpwString )
{
UNICODE_STRING us;
us.Buffer = (LPWSTR) lpwString;
us.Length = wcslen(lpwString) * sizeof (WCHAR);
us.MaximumLength = us.Length + sizeof (WCHAR);
NtDisplayString( & us );
}
/* Native image's entry point */
void
NtProcessStartup( PSTARTUP_ARGUMENT StartupArgument )
{
HANDLE Children[2]; /* csrss, winlogon */
DisplayString( L"Session Manager\n" );
if (TRUE == InitSessionManager(Children))
{
LARGE_INTEGER Time = {{(DWORD)-1,(DWORD)-1}}; /* infinite? */
NTSTATUS wws;
wws = NtWaitForMultipleObjects (
((LONG) sizeof Children / sizeof (HANDLE)),
Children,
WaitAny,
TRUE, /* alertable */
& Time
);
if (!NT_SUCCESS(wws))
{
DisplayString( L"SM: NtWaitForMultipleObjects failed!\n" );
/* FIXME: CRASH THE SYSTEM (BSOD) */
}
}
else
{
DisplayString( L"SM: initialization failed!\n" );
/* FIXME: CRASH SYSTEM (BSOD)*/
}
/*
* OK: CSRSS asked to shutdown the system;
* We die.
*/
NtTerminateProcess( NtCurrentProcess(), 0 );
}
/* EOF */

View file

@ -0,0 +1,38 @@
#include "../../include/defines.h"
#include "../../include/reactos/resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "ReactOS Session Manager\0"
VALUE "FileVersion", "post 0.0.13\0"
VALUE "InternalName", "smss\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "smss.exe\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END