Author: rharabien Date: Fri Jul 8 19:42:53 2011 New Revision: 52574
URL: http://svn.reactos.org/svn/reactos?rev=52574&view=rev Log: [NTDLL/LDR] - Use \KnownDlls\KnownDllPath instead of \KnownDlls\KnownDlls to check known dlls patch (spotted by Thomas Faber) - Assume known dlls are in system32 if \KnownDlls exists but KnownDllPath not
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 Jul 8 19:42:53 2011 @@ -1624,16 +1624,10 @@ &ObjectAttributes);
/* Check if it exists */ - if (!NT_SUCCESS(Status)) - { - /* It doesn't, so assume System32 */ - LdrpKnownDllObjectDirectory = NULL; - RtlInitUnicodeString(&LdrpKnownDllPath, StringBuffer); - LdrpKnownDllPath.Length -= sizeof(WCHAR); - } - else + if (NT_SUCCESS(Status)) { /* Open the Known DLLs Path */ + RtlInitUnicodeString(&KnownDllString, L"KnownDllPath"); InitializeObjectAttributes(&ObjectAttributes, &KnownDllString, OBJ_CASE_INSENSITIVE, @@ -1658,6 +1652,15 @@ } }
+ /* Check if we failed */ + if (!NT_SUCCESS(Status)) + { + /* Aassume System32 */ + LdrpKnownDllObjectDirectory = NULL; + RtlInitUnicodeString(&LdrpKnownDllPath, StringBuffer); + LdrpKnownDllPath.Length -= sizeof(WCHAR); + } + /* If we have process parameters, get the default path and current path */ if (ProcessParameters) {