mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Alexander Yastrebov <menone7@gmail.com>
- SetDllDirectory should add a directory to the search path used to locate DLLs for the application. See issue #4820 for more details. svn path=/trunk/; revision=43357
This commit is contained in:
parent
2e0924d6af
commit
c6895f22d4
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,7 @@ GetDllLoadPath(LPCWSTR lpModule)
|
|||
}
|
||||
|
||||
Length += GetCurrentDirectoryW(0, NULL);
|
||||
Length += GetDllDirectoryW(0, NULL);
|
||||
Length += GetSystemDirectoryW(NULL, 0);
|
||||
Length += GetWindowsDirectoryW(NULL, 0);
|
||||
Length += GetEnvironmentVariableW(L"PATH", NULL, 0);
|
||||
|
@ -84,6 +85,8 @@ GetDllLoadPath(LPCWSTR lpModule)
|
|||
|
||||
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';';
|
||||
Pos += GetWindowsDirectoryW(EnvironmentBufferW + Pos, Length - Pos);
|
||||
|
|
Loading…
Reference in a new issue