2002-10-20 Casper S. Hornstrup <chorns@users.sourceforge.net>

* include/napi/teb.h (RTL_USER_PROCESS_PARAMETERS): Use field names
	as described in Windows NT/2000 Native API Reference.
	* lib/kernel32/file/file.c: Use new field names.
	* lib/kernel32/misc/console.c: Ditto.
	* lib/kernel32/process/create.c: Ditto.
	* lib/kernel32/process/proc.c: Ditto.
	* lib/ntdll/rtl/path.c: Ditto.
	* lib/ntdll/rtl/ppb.c: Ditto.
	* lib/ntdll/rtl/process.c: Ditto.

svn path=/trunk/; revision=3642
This commit is contained in:
Casper Hornstrup 2002-10-20 11:56:00 +00:00
parent bab254e373
commit aa9fe526e2
9 changed files with 344 additions and 333 deletions

View file

@ -1,3 +1,15 @@
2002-10-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/napi/teb.h (RTL_USER_PROCESS_PARAMETERS): Use field names
as described in Windows NT/2000 Native API Reference.
* lib/kernel32/file/file.c: Use new field names.
* lib/kernel32/misc/console.c: Ditto.
* lib/kernel32/process/create.c: Ditto.
* lib/kernel32/process/proc.c: Ditto.
* lib/ntdll/rtl/path.c: Ditto.
* lib/ntdll/rtl/ppb.c: Ditto.
* lib/ntdll/rtl/process.c: Ditto.
2002-10-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/ntos.h: Include relevant files.

View file

@ -33,36 +33,35 @@ typedef struct _PEB_FREE_BLOCK
/* RTL_USER_PROCESS_PARAMETERS.Flags */
#define PPF_NORMALIZED (1)
typedef struct _RTL_USER_PROCESS_PARAMETERS
{
ULONG MaximumLength; // 00h
ULONG Length; // 04h
ULONG Flags; // 08h
ULONG DebugFlags; // 0Ch
PVOID ConsoleHandle; // 10h
ULONG ConsoleFlags; // 14h
HANDLE InputHandle; // 18h
HANDLE OutputHandle; // 1Ch
HANDLE ErrorHandle; // 20h
CURDIR CurrentDirectory; // 24h
UNICODE_STRING DllPath; // 30h
UNICODE_STRING ImagePathName; // 38h
UNICODE_STRING CommandLine; // 40h
PWSTR Environment; // 48h
ULONG StartingX; // 4Ch
ULONG StartingY; // 50h
ULONG CountX; // 54h
ULONG CountY; // 58h
ULONG CountCharsX; // 5Ch
ULONG CountCharsY; // 60h
ULONG FillAttribute; // 64h
ULONG WindowFlags; // 68h
ULONG ShowWindowFlags; // 6Ch
UNICODE_STRING WindowTitle; // 70h
UNICODE_STRING DesktopInfo; // 78h
UNICODE_STRING ShellInfo; // 80h
UNICODE_STRING RuntimeInfo; // 88h
RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20]; // 90h
typedef struct _RTL_USER_PROCESS_PARAMETERS {
ULONG AllocationSize;
ULONG Size;
ULONG Flags;
ULONG DebugFlags;
HANDLE hConsole;
ULONG ProcessGroup;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
UNICODE_STRING CurrentDirectoryName;
HANDLE CurrentDirectoryHandle;
UNICODE_STRING DllPath;
UNICODE_STRING ImagePathName;
UNICODE_STRING CommandLine;
PWSTR Environment;
ULONG dwX;
ULONG dwY;
ULONG dwXSize;
ULONG dwYSize;
ULONG dwXCountChars;
ULONG dwYCountChars;
ULONG dwFillAttribute;
ULONG dwFlags;
ULONG wShowWindow;
UNICODE_STRING WindowTitle;
UNICODE_STRING DesktopInfo;
UNICODE_STRING ShellInfo;
UNICODE_STRING RuntimeInfo;
} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
#define PEB_BASE (0x7FFDF000)

View file

@ -1,4 +1,4 @@
/* $Id: file.c,v 1.36 2002/09/08 10:22:42 chorns Exp $
/* $Id: file.c,v 1.37 2002/10/20 11:55:59 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -259,15 +259,15 @@ GetFileType(HANDLE hFile)
switch ((ULONG)hFile)
{
case STD_INPUT_HANDLE:
hFile = NtCurrentPeb()->ProcessParameters->InputHandle;
hFile = NtCurrentPeb()->ProcessParameters->hStdInput;
break;
case STD_OUTPUT_HANDLE:
hFile = NtCurrentPeb()->ProcessParameters->OutputHandle;
hFile = NtCurrentPeb()->ProcessParameters->hStdOutput;
break;
case STD_ERROR_HANDLE:
hFile = NtCurrentPeb()->ProcessParameters->ErrorHandle;
hFile = NtCurrentPeb()->ProcessParameters->hStdError;
break;
}

View file

@ -1,4 +1,4 @@
/* $Id: console.c,v 1.44 2002/10/20 00:34:39 mdill Exp $
/* $Id: console.c,v 1.45 2002/10/20 11:55:59 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -579,9 +579,9 @@ GetStdHandle(DWORD nStdHandle)
Ppb = NtCurrentPeb()->ProcessParameters;
switch (nStdHandle)
{
case STD_INPUT_HANDLE: return Ppb->InputHandle;
case STD_OUTPUT_HANDLE: return Ppb->OutputHandle;
case STD_ERROR_HANDLE: return Ppb->ErrorHandle;
case STD_INPUT_HANDLE: return Ppb->hStdInput;
case STD_OUTPUT_HANDLE: return Ppb->hStdOutput;
case STD_ERROR_HANDLE: return Ppb->hStdError;
}
SetLastError (ERROR_INVALID_PARAMETER);
return INVALID_HANDLE_VALUE;
@ -614,13 +614,13 @@ SetStdHandle(DWORD nStdHandle,
switch (nStdHandle)
{
case STD_INPUT_HANDLE:
Ppb->InputHandle = hHandle;
Ppb->hStdInput = hHandle;
return TRUE;
case STD_OUTPUT_HANDLE:
Ppb->OutputHandle = hHandle;
Ppb->hStdOutput = hHandle;
return TRUE;
case STD_ERROR_HANDLE:
Ppb->ErrorHandle = hHandle;
Ppb->hStdError = hHandle;
return TRUE;
}
SetLastError (ERROR_INVALID_PARAMETER);

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.54 2002/10/01 19:27:19 chorns Exp $
/* $Id: create.c,v 1.55 2002/10/20 11:56:00 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -477,7 +477,7 @@ KlInitPeb (HANDLE ProcessHandle,
/* create the PPB */
PpbBase = NULL;
PpbSize = Ppb->MaximumLength;
PpbSize = Ppb->AllocationSize;
Status = NtAllocateVirtualMemory(ProcessHandle,
&PpbBase,
0,
@ -493,7 +493,7 @@ KlInitPeb (HANDLE ProcessHandle,
NtWriteVirtualMemory(ProcessHandle,
PpbBase,
Ppb,
Ppb->MaximumLength,
Ppb->AllocationSize,
&BytesWritten);
/* write pointer to environment */
@ -755,23 +755,23 @@ CreateProcessW(LPCWSTR lpApplicationName,
/*
* Translate some handles for the new process
*/
if (Ppb->CurrentDirectory.Handle)
if (Ppb->CurrentDirectoryHandle)
{
Status = NtDuplicateObject (NtCurrentProcess(),
Ppb->CurrentDirectory.Handle,
Ppb->CurrentDirectoryHandle,
hProcess,
&Ppb->CurrentDirectory.Handle,
&Ppb->CurrentDirectoryHandle,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
}
if (Ppb->ConsoleHandle)
if (Ppb->hConsole)
{
Status = NtDuplicateObject (NtCurrentProcess(),
Ppb->ConsoleHandle,
Ppb->hConsole,
hProcess,
&Ppb->ConsoleHandle,
&Ppb->hConsole,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
@ -819,31 +819,31 @@ CreateProcessW(LPCWSTR lpApplicationName,
}
// Set the child console handles
Ppb->InputHandle = NtCurrentPeb()->ProcessParameters->InputHandle;
Ppb->OutputHandle = NtCurrentPeb()->ProcessParameters->OutputHandle;
Ppb->ErrorHandle = NtCurrentPeb()->ProcessParameters->ErrorHandle;
Ppb->hStdInput = NtCurrentPeb()->ProcessParameters->hStdInput;
Ppb->hStdOutput = NtCurrentPeb()->ProcessParameters->hStdOutput;
Ppb->hStdError = NtCurrentPeb()->ProcessParameters->hStdError;
if (lpStartupInfo && (lpStartupInfo->dwFlags & STARTF_USESTDHANDLES))
{
if (lpStartupInfo->hStdInput)
Ppb->InputHandle = lpStartupInfo->hStdInput;
Ppb->hStdInput = lpStartupInfo->hStdInput;
if (lpStartupInfo->hStdOutput)
Ppb->OutputHandle = lpStartupInfo->hStdOutput;
Ppb->hStdOutput = lpStartupInfo->hStdOutput;
if (lpStartupInfo->hStdError)
Ppb->ErrorHandle = lpStartupInfo->hStdError;
Ppb->hStdError = lpStartupInfo->hStdError;
}
if (IsConsoleHandle(Ppb->InputHandle))
if (IsConsoleHandle(Ppb->hStdInput))
{
Ppb->InputHandle = CsrReply.Data.CreateProcessReply.InputHandle;
Ppb->hStdInput = CsrReply.Data.CreateProcessReply.InputHandle;
}
else
{
DPRINT("Duplicate input handle\n");
Status = NtDuplicateObject (NtCurrentProcess(),
Ppb->InputHandle,
Ppb->hStdInput,
hProcess,
&Ppb->InputHandle,
&Ppb->hStdInput,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
@ -853,17 +853,17 @@ CreateProcessW(LPCWSTR lpApplicationName,
}
}
if (IsConsoleHandle(Ppb->OutputHandle))
if (IsConsoleHandle(Ppb->hStdOutput))
{
Ppb->OutputHandle = CsrReply.Data.CreateProcessReply.OutputHandle;
Ppb->hStdOutput = CsrReply.Data.CreateProcessReply.OutputHandle;
}
else
{
DPRINT("Duplicate output handle\n");
Status = NtDuplicateObject (NtCurrentProcess(),
Ppb->OutputHandle,
Ppb->hStdOutput,
hProcess,
&Ppb->OutputHandle,
&Ppb->hStdOutput,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
@ -872,17 +872,17 @@ CreateProcessW(LPCWSTR lpApplicationName,
DPRINT("NtDuplicateObject failed, status %x\n", Status);
}
}
if (IsConsoleHandle(Ppb->ErrorHandle))
if (IsConsoleHandle(Ppb->hStdError))
{
Ppb->ErrorHandle = CsrReply.Data.CreateProcessReply.OutputHandle;
Ppb->hStdError = CsrReply.Data.CreateProcessReply.OutputHandle;
}
else
{
DPRINT("Duplicate error handle\n");
Status = NtDuplicateObject (NtCurrentProcess(),
Ppb->ErrorHandle,
Ppb->hStdError,
hProcess,
&Ppb->ErrorHandle,
&Ppb->hStdError,
0,
TRUE,
DUPLICATE_SAME_ACCESS);
@ -897,20 +897,20 @@ CreateProcessW(LPCWSTR lpApplicationName,
*/
if (lpStartupInfo)
{
Ppb->WindowFlags = lpStartupInfo->dwFlags;
if (Ppb->WindowFlags & STARTF_USESHOWWINDOW)
Ppb->dwFlags = lpStartupInfo->dwFlags;
if (Ppb->dwFlags & STARTF_USESHOWWINDOW)
{
Ppb->ShowWindowFlags = lpStartupInfo->wShowWindow;
Ppb->wShowWindow = lpStartupInfo->wShowWindow;
}
else
{
Ppb->ShowWindowFlags = SW_SHOWDEFAULT;
Ppb->wShowWindow = SW_SHOWDEFAULT;
}
Ppb->StartingX = lpStartupInfo->dwX;
Ppb->StartingY = lpStartupInfo->dwY;
Ppb->CountX = lpStartupInfo->dwXSize;
Ppb->CountY = lpStartupInfo->dwYSize;
Ppb->FillAttribute = lpStartupInfo->dwFillAttribute;
Ppb->dwX = lpStartupInfo->dwX;
Ppb->dwY = lpStartupInfo->dwY;
Ppb->dwXSize = lpStartupInfo->dwXSize;
Ppb->dwYSize = lpStartupInfo->dwYSize;
Ppb->dwFillAttribute = lpStartupInfo->dwFillAttribute;
}
else
{

View file

@ -1,4 +1,4 @@
/* $Id: proc.c,v 1.46 2002/09/08 10:22:45 chorns Exp $
/* $Id: proc.c,v 1.47 2002/10/20 11:56:00 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -389,22 +389,22 @@ GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo)
lpStartupInfo->cb = sizeof(STARTUPINFOW);
lpStartupInfo->lpDesktop = Params->DesktopInfo.Buffer;
lpStartupInfo->lpTitle = Params->WindowTitle.Buffer;
lpStartupInfo->dwX = Params->StartingX;
lpStartupInfo->dwY = Params->StartingY;
lpStartupInfo->dwXSize = Params->CountX;
lpStartupInfo->dwYSize = Params->CountY;
lpStartupInfo->dwXCountChars = Params->CountCharsX;
lpStartupInfo->dwYCountChars = Params->CountCharsY;
lpStartupInfo->dwFillAttribute = Params->FillAttribute;
lpStartupInfo->dwFlags = Params->Flags;
lpStartupInfo->wShowWindow = Params->ShowWindowFlags;
lpStartupInfo->dwX = Params->dwX;
lpStartupInfo->dwY = Params->dwY;
lpStartupInfo->dwXSize = Params->dwXSize;
lpStartupInfo->dwYSize = Params->dwYSize;
lpStartupInfo->dwXCountChars = Params->dwXCountChars;
lpStartupInfo->dwYCountChars = Params->dwYCountChars;
lpStartupInfo->dwFillAttribute = Params->dwFillAttribute;
lpStartupInfo->dwFlags = Params->dwFlags;
lpStartupInfo->wShowWindow = Params->wShowWindow;
lpStartupInfo->lpReserved = Params->ShellInfo.Buffer;
lpStartupInfo->cbReserved2 = Params->RuntimeInfo.Length;
lpStartupInfo->lpReserved2 = (LPBYTE)Params->RuntimeInfo.Buffer;
lpStartupInfo->hStdInput = Params->InputHandle;
lpStartupInfo->hStdOutput = Params->OutputHandle;
lpStartupInfo->hStdError = Params->ErrorHandle;
lpStartupInfo->hStdInput = Params->hStdInput;
lpStartupInfo->hStdOutput = Params->hStdOutput;
lpStartupInfo->hStdError = Params->hStdError;
}
@ -451,21 +451,21 @@ GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)
TRUE);
lpLocalStartupInfo->lpReserved = AnsiString.Buffer;
lpLocalStartupInfo->dwX = Params->StartingX;
lpLocalStartupInfo->dwY = Params->StartingY;
lpLocalStartupInfo->dwXSize = Params->CountX;
lpLocalStartupInfo->dwYSize = Params->CountY;
lpLocalStartupInfo->dwXCountChars = Params->CountCharsX;
lpLocalStartupInfo->dwYCountChars = Params->CountCharsY;
lpLocalStartupInfo->dwFillAttribute = Params->FillAttribute;
lpLocalStartupInfo->dwFlags = Params->Flags;
lpLocalStartupInfo->wShowWindow = Params->ShowWindowFlags;
lpLocalStartupInfo->dwX = Params->dwX;
lpLocalStartupInfo->dwY = Params->dwY;
lpLocalStartupInfo->dwXSize = Params->dwXSize;
lpLocalStartupInfo->dwYSize = Params->dwYSize;
lpLocalStartupInfo->dwXCountChars = Params->dwXCountChars;
lpLocalStartupInfo->dwYCountChars = Params->dwYCountChars;
lpLocalStartupInfo->dwFillAttribute = Params->dwFillAttribute;
lpLocalStartupInfo->dwFlags = Params->dwFlags;
lpLocalStartupInfo->wShowWindow = Params->wShowWindow;
lpLocalStartupInfo->cbReserved2 = Params->RuntimeInfo.Length;
lpLocalStartupInfo->lpReserved2 = (LPBYTE)Params->RuntimeInfo.Buffer;
lpLocalStartupInfo->hStdInput = Params->InputHandle;
lpLocalStartupInfo->hStdOutput = Params->OutputHandle;
lpLocalStartupInfo->hStdError = Params->ErrorHandle;
lpLocalStartupInfo->hStdInput = Params->hStdInput;
lpLocalStartupInfo->hStdOutput = Params->hStdOutput;
lpLocalStartupInfo->hStdError = Params->hStdError;
}
RtlReleasePebLock ();

View file

@ -1,4 +1,4 @@
/* $Id: path.c,v 1.14 2002/09/08 10:23:06 chorns Exp $
/* $Id: path.c,v 1.15 2002/10/20 11:56:00 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -252,7 +252,7 @@ RtlGetCurrentDirectory_U(ULONG MaximumLength,
DPRINT ("RtlGetCurrentDirectory %lu %p\n", MaximumLength, Buffer);
cd = &(NtCurrentPeb ()->ProcessParameters->CurrentDirectory);
cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
RtlAcquirePebLock();
Length = cd->DosPath.Length / sizeof(WCHAR);
@ -304,7 +304,7 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING name)
DPRINT ("RtlSetCurrentDirectory %wZ\n", name);
RtlAcquirePebLock ();
cd = &NtCurrentPeb ()->ProcessParameters->CurrentDirectory;
cd = (PCURDIR)&NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName;
size = cd->DosPath.MaximumLength;
buf = RtlAllocateHeap (RtlGetProcessHeap(),
@ -516,7 +516,7 @@ CHECKPOINT;
RtlAcquirePebLock();
cd = &(NtCurrentPeb ()->ProcessParameters->CurrentDirectory);
cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
DPRINT("type %ld\n", type);
switch (type)
{
@ -707,7 +707,7 @@ RtlDosPathNameToNtPathName_U(PWSTR dosname,
if (nah)
{
memset (nah, 0, sizeof(CURDIR));
cd = &(NtCurrentPeb ()->ProcessParameters->CurrentDirectory);
cd = (PCURDIR)&(NtCurrentPeb ()->ProcessParameters->CurrentDirectoryName);
if (Type == 5 && cd->Handle &&
!_wcsnicmp (cd->DosPath.Buffer, fullname, cd->DosPath.Length / 2))
{

View file

@ -1,4 +1,4 @@
/* $Id: ppb.c,v 1.15 2002/10/01 19:27:20 chorns Exp $
/* $Id: ppb.c,v 1.16 2002/10/20 11:56:00 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -97,10 +97,10 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
if (Environment == NULL)
Environment = NtCurrentPeb()->ProcessParameters->Environment;
if (CurrentDirectory == NULL)
CurrentDirectory = &NtCurrentPeb()->ProcessParameters->CurrentDirectory.DosPath;
CurrentDirectoryHandle = NtCurrentPeb()->ProcessParameters->CurrentDirectory.Handle;
ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
ConsoleFlags = NtCurrentPeb()->ProcessParameters->ConsoleFlags;
CurrentDirectory = &NtCurrentPeb()->ProcessParameters->CurrentDirectoryName;
CurrentDirectoryHandle = NtCurrentPeb()->ProcessParameters->CurrentDirectoryHandle;
ConsoleHandle = NtCurrentPeb()->ProcessParameters->hConsole;
ConsoleFlags = NtCurrentPeb()->ProcessParameters->ProcessGroup;
}
else
{
@ -156,33 +156,33 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
DPRINT ("Process parameters allocated\n");
Param->MaximumLength = RegionSize;
Param->Length = Length;
Param->AllocationSize = RegionSize;
Param->Size = Length;
Param->Flags = PPF_NORMALIZED;
Param->Environment = Environment;
Param->CurrentDirectory.Handle = CurrentDirectoryHandle;
Param->ConsoleHandle = ConsoleHandle;
Param->ConsoleFlags = ConsoleFlags;
Param->CurrentDirectoryHandle = CurrentDirectoryHandle;
Param->hConsole = ConsoleHandle;
Param->ProcessGroup = ConsoleFlags;
Dest = (PWCHAR)(((PBYTE)Param) + sizeof(RTL_USER_PROCESS_PARAMETERS));
/* copy current directory */
RtlpCopyParameterString(&Dest,
&Param->CurrentDirectory.DosPath,
&Param->CurrentDirectoryName,
CurrentDirectory,
MAX_PATH * sizeof(WCHAR));
/* make sure the current directory has a trailing backslash */
if (Param->CurrentDirectory.DosPath.Length > 0)
if (Param->CurrentDirectoryName.Length > 0)
{
ULONG Length;
Length = Param->CurrentDirectory.DosPath.Length / sizeof(WCHAR);
if (Param->CurrentDirectory.DosPath.Buffer[Length-1] != L'\\')
Length = Param->CurrentDirectoryName.Length / sizeof(WCHAR);
if (Param->CurrentDirectoryName.Buffer[Length-1] != L'\\')
{
Param->CurrentDirectory.DosPath.Buffer[Length] = L'\\';
Param->CurrentDirectory.DosPath.Buffer[Length + 1] = 0;
Param->CurrentDirectory.DosPath.Length += sizeof(WCHAR);
Param->CurrentDirectoryName.Buffer[Length] = L'\\';
Param->CurrentDirectoryName.Buffer[Length + 1] = 0;
Param->CurrentDirectoryName.Length += sizeof(WCHAR);
}
}
@ -254,7 +254,7 @@ RtlDeNormalizeProcessParams(PRTL_USER_PROCESS_PARAMETERS Params)
{
if (Params && (Params->Flags & PPF_NORMALIZED))
{
DENORMALIZE(Params->CurrentDirectory.DosPath.Buffer, Params);
DENORMALIZE(Params->CurrentDirectoryName.Buffer, Params);
DENORMALIZE(Params->DllPath.Buffer, Params);
DENORMALIZE(Params->ImagePathName.Buffer, Params);
DENORMALIZE(Params->CommandLine.Buffer, Params);
@ -277,7 +277,7 @@ RtlNormalizeProcessParams(PRTL_USER_PROCESS_PARAMETERS Params)
{
if (Params && !(Params->Flags & PPF_NORMALIZED))
{
NORMALIZE(Params->CurrentDirectory.DosPath.Buffer, Params);
NORMALIZE(Params->CurrentDirectoryName.Buffer, Params);
NORMALIZE(Params->DllPath.Buffer, Params);
NORMALIZE(Params->ImagePathName.Buffer, Params);
NORMALIZE(Params->CommandLine.Buffer, Params);

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.31 2002/10/01 19:27:20 chorns Exp $
/* $Id: process.c,v 1.32 2002/10/20 11:56:00 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -323,7 +323,7 @@ static NTSTATUS KlInitPeb (HANDLE ProcessHandle,
/* create the PPB */
PpbBase = NULL;
PpbSize = Ppb->MaximumLength;
PpbSize = Ppb->AllocationSize;
Status = NtAllocateVirtualMemory(ProcessHandle,
&PpbBase,
0,
@ -342,7 +342,7 @@ static NTSTATUS KlInitPeb (HANDLE ProcessHandle,
NtWriteVirtualMemory(ProcessHandle,
PpbBase,
Ppb,
Ppb->MaximumLength,
Ppb->AllocationSize,
&BytesWritten);
RtlNormalizeProcessParams (Ppb);