X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=lib%2Fntdll%2Frtl%2Fppb.c;h=99243a90ec8b634401a32d98cff2a0802b8b0e93;hb=e3ed2d773259cc445c7ff8181ebd934931365328;hp=50feb7b4b2a43a80e044b319e15cae19d481cb1e;hpb=d378c68f5a9bb25c9e671dacd482d2e25d211df3;p=reactos.git diff --git a/lib/ntdll/rtl/ppb.c b/lib/ntdll/rtl/ppb.c index 50feb7b..99243a9 100644 --- a/lib/ntdll/rtl/ppb.c +++ b/lib/ntdll/rtl/ppb.c @@ -97,10 +97,10 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, if (Environment == NULL) Environment = NtCurrentPeb()->ProcessParameters->Environment; if (CurrentDirectory == NULL) - CurrentDirectory = &NtCurrentPeb()->ProcessParameters->CurrentDirectoryName; - CurrentDirectoryHandle = NtCurrentPeb()->ProcessParameters->CurrentDirectoryHandle; - ConsoleHandle = NtCurrentPeb()->ProcessParameters->hConsole; - ConsoleFlags = NtCurrentPeb()->ProcessParameters->ProcessGroup; + 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->AllocationSize = RegionSize; - Param->Size = Length; + Param->AllocationSize = RegionSize; + Param->Size = Length; Param->Flags = PPF_NORMALIZED; Param->Environment = Environment; - Param->CurrentDirectoryHandle = CurrentDirectoryHandle; - Param->hConsole = ConsoleHandle; - Param->ProcessGroup = 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->CurrentDirectoryName, + &Param->CurrentDirectoryName, CurrentDirectory, MAX_PATH * sizeof(WCHAR)); /* make sure the current directory has a trailing backslash */ - if (Param->CurrentDirectoryName.Length > 0) + if (Param->CurrentDirectoryName.Length > 0) { ULONG Length; - Length = Param->CurrentDirectoryName.Length / sizeof(WCHAR); - if (Param->CurrentDirectoryName.Buffer[Length-1] != L'\\') + Length = Param->CurrentDirectoryName.Length / sizeof(WCHAR); + if (Param->CurrentDirectoryName.Buffer[Length-1] != L'\\') { - Param->CurrentDirectoryName.Buffer[Length] = L'\\'; - Param->CurrentDirectoryName.Buffer[Length + 1] = 0; - Param->CurrentDirectoryName.Length += sizeof(WCHAR); + Param->CurrentDirectoryName.Buffer[Length] = L'\\'; + Param->CurrentDirectoryName.Buffer[Length + 1] = 0; + Param->CurrentDirectoryName.Length += sizeof(WCHAR); } } @@ -235,12 +235,12 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, 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); @@ -254,7 +254,7 @@ RtlDeNormalizeProcessParams(PRTL_USER_PROCESS_PARAMETERS Params) { if (Params && (Params->Flags & PPF_NORMALIZED)) { - DENORMALIZE(Params->CurrentDirectoryName.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->CurrentDirectoryName.Buffer, Params); + NORMALIZE(Params->CurrentDirectoryName.Buffer, Params); NORMALIZE(Params->DllPath.Buffer, Params); NORMALIZE(Params->ImagePathName.Buffer, Params); NORMALIZE(Params->CommandLine.Buffer, Params);