if (Environment == NULL)
Environment = NtCurrentPeb()->ProcessParameters->Environment;
if (CurrentDirectory == NULL)
- CurrentDirectory = &NtCurrentPeb()->ProcessParameters->CurrentDirectoryName;\r
- CurrentDirectoryHandle = NtCurrentPeb()->ProcessParameters->CurrentDirectoryHandle;\r
- ConsoleHandle = NtCurrentPeb()->ProcessParameters->hConsole;\r
- ConsoleFlags = NtCurrentPeb()->ProcessParameters->ProcessGroup;\r
+ CurrentDirectory = &NtCurrentPeb()->ProcessParameters->CurrentDirectoryName;
+ CurrentDirectoryHandle = NtCurrentPeb()->ProcessParameters->CurrentDirectoryHandle;
+ ConsoleHandle = NtCurrentPeb()->ProcessParameters->hConsole;
+ ConsoleFlags = NtCurrentPeb()->ProcessParameters->ProcessGroup;
}
else
{
DPRINT ("Process parameters allocated\n");
- Param->AllocationSize = RegionSize;\r
- Param->Size = Length;\r
+ Param->AllocationSize = RegionSize;
+ Param->Size = Length;
Param->Flags = PPF_NORMALIZED;
Param->Environment = Environment;
- Param->CurrentDirectoryHandle = CurrentDirectoryHandle;\r
- Param->hConsole = ConsoleHandle;\r
- Param->ProcessGroup = ConsoleFlags;\r
+ Param->CurrentDirectoryHandle = CurrentDirectoryHandle;
+ Param->hConsole = ConsoleHandle;
+ Param->ProcessGroup = ConsoleFlags;
Dest = (PWCHAR)(((PBYTE)Param) + sizeof(RTL_USER_PROCESS_PARAMETERS));
/* copy current directory */
RtlpCopyParameterString(&Dest,
- &Param->CurrentDirectoryName,\r
+ &Param->CurrentDirectoryName,
CurrentDirectory,
MAX_PATH * sizeof(WCHAR));
/* make sure the current directory has a trailing backslash */
- if (Param->CurrentDirectoryName.Length > 0)\r
+ if (Param->CurrentDirectoryName.Length > 0)
{
ULONG Length;
- Length = Param->CurrentDirectoryName.Length / sizeof(WCHAR);\r
- if (Param->CurrentDirectoryName.Buffer[Length-1] != L'\\')\r
+ Length = Param->CurrentDirectoryName.Length / sizeof(WCHAR);
+ if (Param->CurrentDirectoryName.Buffer[Length-1] != L'\\')
{
- Param->CurrentDirectoryName.Buffer[Length] = L'\\';\r
- Param->CurrentDirectoryName.Buffer[Length + 1] = 0;\r
- Param->CurrentDirectoryName.Length += sizeof(WCHAR);\r
+ Param->CurrentDirectoryName.Buffer[Length] = L'\\';
+ Param->CurrentDirectoryName.Buffer[Length + 1] = 0;
+ Param->CurrentDirectoryName.Length += sizeof(WCHAR);
}
}
return STATUS_SUCCESS;
}
-VOID STDCALL
+NTSTATUS STDCALL
RtlDestroyProcessParameters(PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
{
ULONG RegionSize = 0;
- NtFreeVirtualMemory (NtCurrentProcess (),
+ return NtFreeVirtualMemory (NtCurrentProcess (),
(PVOID)ProcessParameters,
&RegionSize,
MEM_RELEASE);
{
if (Params && (Params->Flags & PPF_NORMALIZED))
{
- DENORMALIZE(Params->CurrentDirectoryName.Buffer, Params);\r
+ DENORMALIZE(Params->CurrentDirectoryName.Buffer, Params);
DENORMALIZE(Params->DllPath.Buffer, Params);
DENORMALIZE(Params->ImagePathName.Buffer, Params);
DENORMALIZE(Params->CommandLine.Buffer, Params);
{
if (Params && !(Params->Flags & PPF_NORMALIZED))
{
- NORMALIZE(Params->CurrentDirectoryName.Buffer, Params);\r
+ NORMALIZE(Params->CurrentDirectoryName.Buffer, Params);
NORMALIZE(Params->DllPath.Buffer, Params);
NORMALIZE(Params->ImagePathName.Buffer, Params);
NORMALIZE(Params->CommandLine.Buffer, Params);