mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:22:58 +00:00
Removed special case of process without process parameter block for initial process (smss.exe).
svn path=/trunk/; revision=3759
This commit is contained in:
parent
5a6a428544
commit
da9ce8cff3
1 changed files with 16 additions and 19 deletions
|
@ -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))
|
||||||
{
|
{
|
||||||
|
DbgPrint("Failed to access the process parameter block\n");
|
||||||
|
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
||||||
|
}
|
||||||
|
|
||||||
RtlCreateUnicodeString(&ExeModule->FullDllName,
|
RtlCreateUnicodeString(&ExeModule->FullDllName,
|
||||||
Peb->ProcessParameters->ImagePathName.Buffer);
|
Peb->ProcessParameters->ImagePathName.Buffer);
|
||||||
RtlCreateUnicodeString(&ExeModule->BaseDllName,
|
RtlCreateUnicodeString(&ExeModule->BaseDllName,
|
||||||
wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1);
|
wcsrchr(ExeModule->FullDllName.Buffer, L'\\') + 1);
|
||||||
}
|
|
||||||
else
|
DPRINT("BaseDllName '%wZ' FullDllName '%wZ'\n",
|
||||||
{
|
&ExeModule->BaseDllName,
|
||||||
/* FIXME(???): smss.exe doesn't have a process parameter block */
|
&ExeModule->FullDllName);
|
||||||
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
|
|
||||||
wcscat (FullNtDllPath, L"\\system32\\smss.exe");
|
|
||||||
RtlCreateUnicodeString (&ExeModule->BaseDllName,
|
|
||||||
L"smss.exe");
|
|
||||||
RtlCreateUnicodeString (&ExeModule->FullDllName,
|
|
||||||
FullNtDllPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
ExeModule->Flags = 0;
|
ExeModule->Flags = 0;
|
||||||
ExeModule->LoadCount = -1; /* don't unload */
|
ExeModule->LoadCount = -1; /* don't unload */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue