*** empty log message ***

svn path=/trunk/; revision=632
This commit is contained in:
David Welch
1999-08-29 13:45:08 +00:00
parent 7cf48757dc
commit e31d342bc7
37 changed files with 336 additions and 334 deletions

View File

@@ -200,6 +200,9 @@ $(SUBSYS:%=%_dist): %_dist:
# Make an install floppy
#
install: all
./install.sh /mnt/hda1
make_floppy_dirs:
ifeq ($(DOSCLI),yes)
mkdir $(FLOPPY_DIR)\dlls

View File

@@ -4,6 +4,8 @@
OBJECTS= args.o
PROGS= args.exe
BASE_CFLAGS = -I../../include
all: $(PROGS)
.phony: all

View File

@@ -5,6 +5,7 @@ OBJECTS = ../common/crt0.o hello.o
PROGS = hello.exe
LIBS = ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES = hello.o hello.exe
BASE_CFLAGS = -I../../include
all: hello.exe

View File

@@ -6,6 +6,8 @@ PROGS= shell.exe
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES= shell.o shell.exe shell.sym
BASE_CFLAGS = -I../../include
all: shell.exe
clean: $(CLEAN_FILES:%=%_clean)

View File

@@ -3,6 +3,8 @@
#
OBJECTS = beep.o ../../../ntoskrnl/ntoskrnl.a
BASE_CLAGS = -I../../../include
all: beep.sys
.PHONY: all

View File

@@ -3,6 +3,8 @@
#
TARGET = blue
BASE_CFLAGS = -I../../../include
OBJECTS = blue.o ../../../ntoskrnl/ntoskrnl.a
all: blue.sys
@@ -49,3 +51,4 @@ blue.sys: $(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=ide
OBJECTS = ide.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: ide.sys
.phony: all
@@ -47,3 +49,4 @@ ide.sys: $(OBJECTS)
-specs=../../svc_specs -mdll -o ide.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=keyboard
OBJECTS = keyboard.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: keyboard.sys
.phony: all
@@ -46,3 +48,5 @@ keyboard.sys: $(OBJECTS)
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o keyboard.sys $(OBJECTS) -Wl,temp.exp
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=null
OBJECTS= null.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: null.sys
.phony: all
@@ -48,3 +50,4 @@ null.sys: $(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=parallel
OBJECTS= parallel.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: parallel.sys
.phony: all
@@ -48,3 +50,4 @@ parallel.sys: $(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET= serial
OBJECTS= serial.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: serial.sys
.phony: all
@@ -48,3 +50,4 @@ serial.sys: $(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=vidport
OBJECTS = vidport.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: vidport.sys vidport.a
.phony: all
@@ -54,3 +56,4 @@ vidport.a: vidport.sys vidport.def
--output-lib vidport.a
include ../../../rules.mak

View File

@@ -1,6 +1,9 @@
#
#
#
BASE_CFLAGS = -I../../../include
OBJECTS = super.o blockdev.o inode.o file.o dir.o rw.o quota.o security.o \
attr.o ../../../ntoskrnl/ntoskrnl.a
@@ -34,3 +37,4 @@ ext2fs.sys: $(OBJECTS)
-specs=$(KM_SPECS) -mdll -o ext2fs.sys $(OBJECTS) -Wl,temp.exp
$(RM) temp.exp
include ../../../rules.mak

View File

@@ -1,3 +1,5 @@
BASE_CFLAGS = -I../../../include
all: minix.sys
OBJECTS = block.o rw.o inode.o dir.o mount.o blockdev.o \

View File

@@ -3,6 +3,8 @@
#
OBJECTS = template.o
BASE_CFLAGS = -I../../../include
all: tfsd.o
.phony: all
@@ -15,3 +17,5 @@ clean:
tfsd.o: template.o
$(LD) -r template.o -o tfsd.o
include ../../rules.mak

View File

@@ -4,6 +4,8 @@
TARGET=vfatfsd
OBJECTS = blockdev.o dir.o dirwr.o iface.o ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: vfatfsd.sys
.phony: all
@@ -55,3 +57,4 @@ vfatfsd.sys: $(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/07/04 11:14:15 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:44:52 dwelch Exp $
#
# ReactOS Operating System
#
@@ -7,6 +7,8 @@
#
TARGET = defedf
BASE_CFLAGS = -I../../include
all: $(TARGET)$(EXE_POSTFIX)
$(TARGET)$(EXE_POSTFIX): $(TARGET).c

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.8 1999/06/17 00:10:30 ea Exp $
# $Id: makefile,v 1.9 1999/08/29 13:44:52 dwelch Exp $
#
# ReactOS Operating System
#
@@ -15,10 +15,12 @@ KERNEL_SERVICE_TABLE = ../../include/ntdll/napi.h
KERNEL_ZW_CALLS = ../../ntoskrnl/nt/zw.c
NAPI_FILES = $(NTDLL_STUBS) $(KERNEL_SERVICE_TABLE) $(KERNEL_ZW_CALLS)
BASE_CFLAGS = -I../../include
all: $(TARGET)$(EXE_POSTFIX) $(NAPI_FILES)
$(NAPI_FILES): $(SYSTEM_CALLS_DB) $(TARGET)$(EXE_POSTFIX)
$(TARGET)$(EXE_POSTFIX) \
./$(TARGET)$(EXE_POSTFIX) \
$(SYSTEM_CALLS_DB) \
$(NTDLL_STUBS) \
$(KERNEL_SERVICE_TABLE) \

View File

@@ -1,7 +1,10 @@
# $Id: makefile,v 1.6 1999/07/26 20:46:39 ea Exp $
# $Id: makefile,v 1.7 1999/08/29 13:44:52 dwelch Exp $
#
# Makefile for ReactOS advapi32.dll
#
BASE_CFLAGS = -I../../include
TARGET=advapi32
ifneq ($(HOST),mingw32-windows)
ifneq ($(HOST),mingw32-linux)

View File

@@ -1,23 +0,0 @@
# Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details
TOP=../..
SRC += ct_flags.c
SRC += ct_lower.c
SRC += ct_upper.c
SRC += isalnum.c
SRC += isalpha.c
SRC += isascii.c
SRC += iscntrl.c
SRC += isdigit.c
SRC += isgraph.c
SRC += islower.c
SRC += isprint.c
SRC += ispunct.c
SRC += isspace.c
SRC += isupper.c
SRC += isxdigit.c
SRC += toascii.c
SRC += tolower.c
SRC += toupper.c
include $(TOP)/../makefile.inc

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.32 1999/07/16 23:37:04 rex Exp $
# $Id: makefile,v 1.33 1999/08/29 13:44:53 dwelch Exp $
#
# ReactOS Operating System
#
@@ -13,6 +13,8 @@ else
DLLTARGET=$(TARGET).dll
endif
BASE_CFLAGS = -I../../include
all: $(DLLTARGET)

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.6 1999/07/17 23:10:19 ea Exp $
# $Id: makefile,v 1.7 1999/08/29 13:44:53 dwelch Exp $
#
# Makefile for fmifs.dll
#
@@ -13,6 +13,8 @@ else
DLLTARGET=$(TARGET).dll
endif
BASE_CFLAGS = -I../../include
all: $(DLLTARGET)
IFS_OBJECTS = chkdsk.o compress.o diskcopy.o extend.o \

View File

@@ -1,9 +1,11 @@
# $Id: makefile,v 1.7 1999/07/17 23:10:19 ea Exp $
# $Id: makefile,v 1.8 1999/08/29 13:44:54 dwelch Exp $
#
# Makefile for ReactOS gdi32.dll
#
TARGET=gdi32
BASE_CFLAGS = -I../../include
ifneq ($(HOST),mingw32-windows)
ifneq ($(HOST),mingw32-linux)
DLLTARGET=$(TARGET).a

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.23 1999/07/17 23:10:20 ea Exp $
# $Id: makefile,v 1.24 1999/08/29 13:44:56 dwelch Exp $
#
# ReactOS Operating System
#
@@ -6,6 +6,8 @@ TARGET=kernel32
KERNEL32_BASE = 0x77f00000
BASE_CFLAGS = -I../../include
CFLAGS = $(CFLAGS) -DKERNEL32_BASE=$(KERNEL32_BASE)
ifneq ($(HOST),mingw32-windows)

View File

@@ -1,5 +1,7 @@
LIBRARIES = ntdll kernel32
BASE_CFLAGS = -I../include
all: $(LIBRARIES)
ntdll: dummy

View File

@@ -1,9 +1,11 @@
# $Id: makefile,v 1.21 1999/07/29 21:14:02 ekohl Exp $
# $Id: makefile,v 1.22 1999/08/29 13:44:57 dwelch Exp $
#
# ReactOS Operating System
#
TARGET=ntdll
BASE_CFLAGS = -I../../include
IMAGE_BASE = 0x77f60000
ifneq ($(HOST),mingw32-windows)

View File

@@ -1,9 +1,11 @@
# $Id: makefile_rex,v 1.6 1999/07/17 23:10:25 ea Exp $
# $Id: makefile_rex,v 1.7 1999/08/29 13:44:58 dwelch Exp $
#
# ReactOS Operating System
#
# Makefile for user32.dll
#
BASE_CFLAGS = -I../../include
include ../../rules.mak
TARGET=user32

View File

@@ -1,9 +1,11 @@
# $Id: makefile,v 1.1 1999/08/11 19:56:48 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:44:58 dwelch Exp $
#
# Makefile for ReactOS version.dll
#
TARGET=version
BASE_CFLAGS = -I../../include
ifneq ($(HOST),mingw32-windows)
ifneq ($(HOST),mingw32-linux)
DLLTARGET=$(TARGET).a

View File

@@ -31,7 +31,7 @@
#include <internal/teb.h>
#include <ddk/ntddk.h>
#define NDEBUG
//#define NDEBUG
#include <internal/debug.h>
#include "syspath.h"
@@ -57,265 +57,221 @@
#define STACK_TOP (0xb0000000)
static
NTSTATUS
LdrCreatePeb(HANDLE ProcessHandle)
static NTSTATUS LdrCreatePeb(HANDLE ProcessHandle)
{
NTSTATUS Status;
PVOID PebBase;
ULONG PebSize;
NT_PEB Peb;
ULONG BytesWritten;
PebBase = (PVOID)PEB_BASE;
PebSize = 0x1000;
Status = ZwAllocateVirtualMemory(
ProcessHandle,
& PebBase,
0,
& PebSize,
MEM_COMMIT,
PAGE_READWRITE
);
if (!NT_SUCCESS(Status))
{
return(Status);
}
NTSTATUS Status;
PVOID PebBase;
ULONG PebSize;
NT_PEB Peb;
ULONG BytesWritten;
memset(
& Peb,
0,
sizeof Peb
);
Peb.StartupInfo = (PPROCESSINFOW) PEB_STARTUPINFO;
PebBase = (PVOID)PEB_BASE;
PebSize = 0x1000;
Status = ZwAllocateVirtualMemory(ProcessHandle,
&PebBase,
0,
&PebSize,
MEM_COMMIT,
PAGE_READWRITE);
if (!NT_SUCCESS(Status))
{
return(Status);
}
memset(&Peb, 0, sizeof Peb);
Peb.StartupInfo = (PPROCESSINFOW) PEB_STARTUPINFO;
ZwWriteVirtualMemory(
ProcessHandle,
(PVOID) PEB_BASE,
& Peb,
sizeof Peb,
& BytesWritten
);
ZwWriteVirtualMemory(ProcessHandle,
(PVOID)PEB_BASE,
&Peb,
sizeof(Peb),
&BytesWritten);
return(STATUS_SUCCESS);
return(STATUS_SUCCESS);
}
NTSTATUS
LdrLoadImage (
HANDLE ProcessHandle,
PUNICODE_STRING Filename
)
NTSTATUS LdrLoadImage(HANDLE ProcessHandle,
PUNICODE_STRING Filename)
{
CHAR BlockBuffer [1024];
DWORD ImageBase;
DWORD LdrStartupAddr;
DWORD StackBase;
ULONG ImageSize;
ULONG StackSize;
NTSTATUS Status;
OBJECT_ATTRIBUTES FileObjectAttributes;
HANDLE FileHandle;
HANDLE SectionHandle;
HANDLE NTDllSectionHandle;
HANDLE ThreadHandle;
HANDLE DupNTDllSectionHandle;
CONTEXT Context;
UNICODE_STRING DllPathname;
PIMAGE_DOS_HEADER DosHeader;
PIMAGE_NT_HEADERS NTHeaders;
ULONG BytesWritten;
ULONG InitialViewSize;
ULONG i;
HANDLE DupSectionHandle;
WCHAR TmpNameBuffer [MAX_PATH];
CHAR BlockBuffer [1024];
DWORD ImageBase;
DWORD LdrStartupAddr;
DWORD StackBase;
ULONG ImageSize;
ULONG StackSize;
NTSTATUS Status;
OBJECT_ATTRIBUTES FileObjectAttributes;
HANDLE FileHandle;
HANDLE SectionHandle;
HANDLE NTDllSectionHandle;
HANDLE ThreadHandle;
HANDLE DupNTDllSectionHandle;
CONTEXT Context;
UNICODE_STRING DllPathname;
PIMAGE_DOS_HEADER DosHeader;
PIMAGE_NT_HEADERS NTHeaders;
ULONG BytesWritten;
ULONG InitialViewSize;
ULONG i;
HANDLE DupSectionHandle;
WCHAR TmpNameBuffer [MAX_PATH];
/* -- PART I -- */
/*
* Locate and open NTDLL to determine ImageBase
* and LdrStartup
*/
GetSystemDirectory(
TmpNameBuffer,
sizeof TmpNameBuffer
);
wcscat(
TmpNameBuffer,
L"\\ntdll.dll"
);
RtlInitUnicodeString(
& DllPathname,
TmpNameBuffer
);
InitializeObjectAttributes(
& FileObjectAttributes,
& DllPathname,
0,
NULL,
NULL
);
DPRINT("Opening NTDLL\n");
Status = ZwOpenFile(
& FileHandle,
FILE_ALL_ACCESS,
& FileObjectAttributes,
NULL,
0,
0
);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL open failed ");
DbgPrintErrorMessage(Status);
return Status;
}
Status = ZwReadFile(
FileHandle,
0,
0,
0,
0,
BlockBuffer,
sizeof BlockBuffer,
0,
0
);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL header read failed ");
DbgPrintErrorMessage(Status);
ZwClose(FileHandle);
return Status;
}
/*
* FIXME: this will fail if the NT headers are
* more than 1024 bytes from start.
*/
DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer;
NTHeaders = (PIMAGE_NT_HEADERS) (BlockBuffer + DosHeader->e_lfanew);
if (
(DosHeader->e_magic != IMAGE_DOS_MAGIC)
|| (DosHeader->e_lfanew == 0L)
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC)
)
{
DPRINT("NTDLL format invalid\n");
ZwClose(FileHandle);
return STATUS_UNSUCCESSFUL;
}
ImageBase = NTHeaders->OptionalHeader.ImageBase;
ImageSize = NTHeaders->OptionalHeader.SizeOfImage;
/*
* FIXME: retrieve the offset of LdrStartup from NTDLL
*/
DPRINT("ImageBase %x\n",ImageBase);
LdrStartupAddr =
ImageBase
+ NTHeaders->OptionalHeader.AddressOfEntryPoint;
/*
* Create a section for NTDLL
*/
Status = ZwCreateSection(
& NTDllSectionHandle,
SECTION_ALL_ACCESS,
NULL,
NULL,
PAGE_READWRITE,
MEM_COMMIT,
FileHandle
);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL create section failed ");
DbgPrintErrorMessage(Status);
ZwClose(FileHandle);
return Status;
}
/*
* Map the NTDLL into the process
*/
InitialViewSize =
DosHeader->e_lfanew
+ sizeof (IMAGE_NT_HEADERS)
+ ( sizeof (IMAGE_SECTION_HEADER)
* NTHeaders->FileHeader.NumberOfSections
);
Status = ZwMapViewOfSection(
NTDllSectionHandle,
ProcessHandle,
(PVOID *) & ImageBase,
0,
InitialViewSize,
NULL,
& InitialViewSize,
0,
MEM_COMMIT,
PAGE_READWRITE
);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL map view of secion failed ");
DbgPrintErrorMessage(Status);
/* FIXME: destroy the section here */
ZwClose(FileHandle);
return Status;
}
for ( i = 0;
(i < NTHeaders->FileHeader.NumberOfSections);
i++
)
{
PIMAGE_SECTION_HEADER Sections;
LARGE_INTEGER Offset;
ULONG Base;
Sections =
(PIMAGE_SECTION_HEADER) SECHDROFFSET(BlockBuffer);
Base =
Sections[i].VirtualAddress
+ ImageBase;
Offset.u.LowPart =
Sections[i].PointerToRawData;
Offset.u.HighPart =
0;
Status = ZwMapViewOfSection(
NTDllSectionHandle,
ProcessHandle,
(PVOID *) & Base,
0,
Sections[i].Misc.VirtualSize,
& Offset,
(PULONG) & Sections[i].Misc.VirtualSize,
0,
MEM_COMMIT,
PAGE_READWRITE
);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL map view of secion failed ");
DbgPrintErrorMessage(Status);
/* FIXME: destroy the section here */
ZwClose(FileHandle);
return Status;
}
}
/*
* Locate and open NTDLL to determine ImageBase
* and LdrStartup
*/
GetSystemDirectory(TmpNameBuffer, sizeof TmpNameBuffer);
wcscat(TmpNameBuffer, L"\\ntdll.dll");
RtlInitUnicodeString(&DllPathname, TmpNameBuffer);
InitializeObjectAttributes(&FileObjectAttributes,
&DllPathname,
0,
NULL,
NULL);
DPRINT("Opening NTDLL\n");
Status = ZwOpenFile(&FileHandle,
FILE_ALL_ACCESS,
&FileObjectAttributes,
NULL,
0,
0);
if (!NT_SUCCESS(Status))
{
DbgPrint("NTDLL open failed ");
DbgPrintErrorMessage(Status);
return Status;
}
Status = ZwReadFile(FileHandle,
0,
0,
0,
0,
BlockBuffer,
sizeof BlockBuffer,
0,
0);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL header read failed ");
DbgPrintErrorMessage(Status);
ZwClose(FileHandle);
return Status;
}
/*
* FIXME: this will fail if the NT headers are
* more than 1024 bytes from start.
*/
DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer;
NTHeaders = (PIMAGE_NT_HEADERS) (BlockBuffer + DosHeader->e_lfanew);
if ((DosHeader->e_magic != IMAGE_DOS_MAGIC)
|| (DosHeader->e_lfanew == 0L)
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC))
{
DPRINT("NTDLL format invalid\n");
ZwClose(FileHandle);
return STATUS_UNSUCCESSFUL;
}
ImageBase = NTHeaders->OptionalHeader.ImageBase;
ImageSize = NTHeaders->OptionalHeader.SizeOfImage;
/*
* FIXME: retrieve the offset of LdrStartup from NTDLL
*/
DPRINT("ImageBase %x\n",ImageBase);
LdrStartupAddr = ImageBase + NTHeaders->OptionalHeader.AddressOfEntryPoint;
/*
* Create a section for NTDLL
*/
Status = ZwCreateSection(&NTDllSectionHandle,
SECTION_ALL_ACCESS,
NULL,
NULL,
PAGE_READWRITE,
MEM_COMMIT,
FileHandle);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL create section failed ");
DbgPrintErrorMessage(Status);
ZwClose(FileHandle);
/* -- PART II -- */
return Status;
}
/*
* Map the NTDLL into the process
*/
InitialViewSize = DosHeader->e_lfanew
+ sizeof (IMAGE_NT_HEADERS)
+ ( sizeof (IMAGE_SECTION_HEADER)
* NTHeaders->FileHeader.NumberOfSections
);
Status = ZwMapViewOfSection(NTDllSectionHandle,
ProcessHandle,
(PVOID *) & ImageBase,
0,
InitialViewSize,
NULL,
&InitialViewSize,
0,
MEM_COMMIT,
PAGE_READWRITE);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL map view of secion failed ");
DbgPrintErrorMessage(Status);
/* FIXME: destroy the section here */
ZwClose(FileHandle);
return Status;
}
for (i = 0;
(i < NTHeaders->FileHeader.NumberOfSections);
i++)
{
PIMAGE_SECTION_HEADER Sections;
LARGE_INTEGER Offset;
ULONG Base;
Sections = (PIMAGE_SECTION_HEADER) SECHDROFFSET(BlockBuffer);
Base = Sections[i].VirtualAddress + ImageBase;
Offset.u.LowPart = Sections[i].PointerToRawData;
Offset.u.HighPart = 0;
Status = ZwMapViewOfSection(NTDllSectionHandle,
ProcessHandle,
(PVOID *) & Base,
0,
Sections[i].Misc.VirtualSize,
&Offset,
(PULONG) & Sections[i].Misc.VirtualSize,
0,
MEM_COMMIT,
PAGE_READWRITE);
if (!NT_SUCCESS(Status))
{
DPRINT("NTDLL map view of secion failed ");
DbgPrintErrorMessage(Status);
/* FIXME: destroy the section here */
ZwClose(FileHandle);
return Status;
}
}
ZwClose(FileHandle);
/* -- PART II -- */
/*
* Open process image to determine ImageBase
@@ -570,52 +526,41 @@ LdrLoadImage (
* FIXME: The location of the initial process should be configurable,
* from command line or registry
*/
NTSTATUS
LdrLoadInitialProcess (VOID)
NTSTATUS LdrLoadInitialProcess (VOID)
{
NTSTATUS Status;
HANDLE ProcessHandle;
UNICODE_STRING ProcessName;
WCHAR TmpNameBuffer [MAX_PATH];
Status = ZwCreateProcess(
& ProcessHandle,
PROCESS_ALL_ACCESS,
NULL,
SystemProcessHandle,
FALSE,
NULL,
NULL,
NULL
);
if (!NT_SUCCESS(Status))
{
DbgPrint("Could not create process\n");
return Status;
}
/*
* Get the system directory's name (a DOS device
* alias name which is in \\??\\).
*/
GetSystemDirectory(
TmpNameBuffer,
sizeof TmpNameBuffer
);
wcscat(
TmpNameBuffer,
L"\\shell.exe" /* FIXME: should be smss.exe */
);
RtlInitUnicodeString(
& ProcessName,
TmpNameBuffer
);
Status = LdrLoadImage(
ProcessHandle,
& ProcessName
);
NTSTATUS Status;
HANDLE ProcessHandle;
UNICODE_STRING ProcessName;
WCHAR TmpNameBuffer [MAX_PATH];
Status = ZwCreateProcess(&ProcessHandle,
PROCESS_ALL_ACCESS,
NULL,
SystemProcessHandle,
FALSE,
NULL,
NULL,
NULL);
if (!NT_SUCCESS(Status))
{
DbgPrint("Could not create process\n");
return Status;
}
/*
* Get the system directory's name (a DOS device
* alias name which is in \\??\\).
*/
GetSystemDirectory(TmpNameBuffer, sizeof TmpNameBuffer);
wcscat(TmpNameBuffer, L"\\shell.exe");
RtlInitUnicodeString(&ProcessName, TmpNameBuffer);
Status = LdrLoadImage(ProcessHandle, &ProcessName);
if (!NT_SUCCESS(Status))
{
DbgPrint("Failed to load %W\n",&ProcessName);
}
return Status;
}
/* EOF */

View File

@@ -1,9 +1,11 @@
# $Id: makefile_rex,v 1.30 1999/08/11 23:23:48 ekohl Exp $
# $Id: makefile_rex,v 1.31 1999/08/29 13:44:58 dwelch Exp $
#
# ReactOS Operating System
#
TARGET=ntoskrnl
BASE_CFLAGS = -I../include
all: objects $(TARGET).exe
#

View File

@@ -61,12 +61,10 @@ endif
CC = $(PREFIX)gcc
NATIVE_CC = gcc
CFLAGS = \
CFLAGS = $(BASE_CFLAGS) \
-pipe \
-O2 \
-I../../../include \
-I../../include \
-I../include \
-Iinclude \
-fno-builtin $(LEAN_AND_MEAN_DEFINE) \
$(DEFINES) -Wall \
-Wstrict-prototypes $(DEBUGGING_CFLAGS) \

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/07/17 23:10:29 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:45:05 dwelch Exp $
#
# Local Security Authority Subsystem
#
@@ -6,6 +6,8 @@
#
TARGET=lsass
BASE_CFLAGS = -I../../include
OBJECTS = $(TARGET).o init.o $(TARGET).coff
LIBS = ../../lib/ntdll/ntdll.a

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/05/30 20:40:18 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:45:06 dwelch Exp $
#
# Session Manager
#
@@ -6,6 +6,8 @@
#
TARGET=smss
BASE_CFLAGS = -I../../include
OBJECTS = $(TARGET).o init.o $(TARGET).coff
LIBS = ../../lib/ntdll/ntdll.a

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/06/18 22:40:47 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:45:06 dwelch Exp $
#
# Logon/login Application
#
@@ -6,6 +6,8 @@
#
TARGET=winlogon
BASE_CFLAGS = -I../../include
OBJECTS = $(TARGET).o init.o $(TARGET).coff
LIBS = ../../lib/ntdll/ntdll.a

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/06/08 22:50:59 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:45:07 dwelch Exp $
#
# CSRSS: Client/server runtime subsystem
#
@@ -6,6 +6,8 @@
#
TARGET=csrss
BASE_CFLAGS = -I../../include
OBJECTS_API = api/process.o
OBJECTS_SBAPI =

View File

@@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/07/17 23:10:31 ea Exp $
# $Id: makefile,v 1.2 1999/08/29 13:45:07 dwelch Exp $
#
# CSRSS: Client/server run-time subsystem
#
@@ -6,6 +6,8 @@
#
TARGET=csrss
BASE_CFLAGS = -I../../include
OBJECTS = $(TARGET).o init.o $(TARGET).coff
LIBS = ../../lib/ntdll/ntdll.a

View File

@@ -2,6 +2,8 @@
# WIN32K.SYS build spec
#
BASE_CFLAGS = -I../../include
MAIN_OBJECTS = main/dllmain.o
MISC_OBJECTS = misc/driver.o
OBJECTS_OBJECTS = objects/bitmaps.o objects/brush.o objects/cliprgn.o \