Removed special case of process without process parameter block for initial process (smss.exe).

svn path=/trunk/; revision=3759
This commit is contained in:
Eric Kohl 2002-11-15 22:06:01 +00:00
parent 5a6a428544
commit da9ce8cff3

View file

@ -1,4 +1,4 @@
/* $Id: startup.c,v 1.45 2002/11/07 16:36:50 robd Exp $ /* $Id: startup.c,v 1.46 2002/11/15 22:06:01 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -225,24 +225,21 @@ LdrInitializeThunk (ULONG Unknown1,
} }
ExeModule->BaseAddress = Peb->ImageBaseAddress; ExeModule->BaseAddress = Peb->ImageBaseAddress;
if ((Peb->ProcessParameters != NULL) && if ((Peb->ProcessParameters == NULL) ||
(Peb->ProcessParameters->ImagePathName.Length != 0)) (Peb->ProcessParameters->ImagePathName.Length == 0))
{ {
RtlCreateUnicodeString (&ExeModule->FullDllName, DbgPrint("Failed to access the process parameter block\n");
Peb->ProcessParameters->ImagePathName.Buffer); ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
RtlCreateUnicodeString (&ExeModule->BaseDllName, }
wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1);
} RtlCreateUnicodeString(&ExeModule->FullDllName,
else Peb->ProcessParameters->ImagePathName.Buffer);
{ RtlCreateUnicodeString(&ExeModule->BaseDllName,
/* FIXME(???): smss.exe doesn't have a process parameter block */ wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1);
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
wcscat (FullNtDllPath, L"\\system32\\smss.exe"); DPRINT("BaseDllName '%wZ' FullDllName '%wZ'\n",
RtlCreateUnicodeString (&ExeModule->BaseDllName, &ExeModule->BaseDllName,
L"smss.exe"); &ExeModule->FullDllName);
RtlCreateUnicodeString (&ExeModule->FullDllName,
FullNtDllPath);
}
ExeModule->Flags = 0; ExeModule->Flags = 0;
ExeModule->LoadCount = -1; /* don't unload */ ExeModule->LoadCount = -1; /* don't unload */