Author: fireball
Date: Sat Oct 10 11:16:34 2009
New Revision: 43357
URL:
http://svn.reactos.org/svn/reactos?rev=43357&view=rev
Log:
Alexander Yastrebov <menone7(a)gmail.com>
- SetDllDirectory should add a directory to the search path used to locate DLLs for the
application.
See issue #4820 for more details.
Modified:
trunk/reactos/dll/win32/kernel32/misc/ldr.c
Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ld…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] Sat Oct 10 11:16:34 2009
@@ -63,6 +63,7 @@
}
Length += GetCurrentDirectoryW(0, NULL);
+ Length += GetDllDirectoryW(0, NULL);
Length += GetSystemDirectoryW(NULL, 0);
Length += GetWindowsDirectoryW(NULL, 0);
Length += GetEnvironmentVariableW(L"PATH", NULL, 0);
@@ -83,6 +84,8 @@
}
Pos += GetCurrentDirectoryW(Length, EnvironmentBufferW + Pos);
+ EnvironmentBufferW[Pos++] = L';';
+ Pos += GetDllDirectoryW(Length - Pos, EnvironmentBufferW + Pos);
EnvironmentBufferW[Pos++] = L';';
Pos += GetSystemDirectoryW(EnvironmentBufferW + Pos, Length - Pos);
EnvironmentBufferW[Pos++] = L';';