Author: fireball Date: Fri Aug 19 21:36:16 2011 New Revision: 53327
URL: http://svn.reactos.org/svn/reactos?rev=53327&view=rev Log: [NTDLL/LDR] - Fix acquiring image path from process parameters block (the if condition was inverted so that normalization didn't occur when it should). - Reenable the image options initialization code.
Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c
Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrinit.c?rev... ============================================================================== --- trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] Fri Aug 19 21:36:16 2011 @@ -1311,16 +1311,15 @@ NTAPI LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY OptionsKey) { - //NTSTATUS Status; - //HKEY KeyHandle; - //ULONG ExecuteOptions, MinimumStackCommit = 0, GlobalFlag; + NTSTATUS Status; + HKEY KeyHandle; + ULONG ExecuteOptions, MinimumStackCommit = 0, GlobalFlag;
/* Return error if we were not provided a pointer where to save the options key handle */ if (!OptionsKey) return STATUS_INVALID_HANDLE;
/* Zero initialize the optinos key pointer */ *OptionsKey = NULL; -#if 0
/* Open the options key */ Status = LdrOpenImageFileOptionsKey(ImagePathName, 0, &KeyHandle); @@ -1409,7 +1408,7 @@ // Status = LdrpInitializeApplicationVerifierPackage(ImagePathName, Peb, 1, FALSE); } } -#endif + return STATUS_SUCCESS; }
@@ -1466,8 +1465,8 @@ /* Get the image path */ ImagePath = Peb->ProcessParameters->ImagePathName.Buffer;
- /* Check if it's normalized */ - if (Peb->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED) + /* Check if it's not normalized */ + if (!(Peb->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED)) { /* Normalize it*/ ImagePath = (PWSTR)((ULONG_PTR)ImagePath + (ULONG_PTR)Peb->ProcessParameters);