mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[WINESYNC] dbghelp: Replace another usage of GetEnvironmentVariable() with the target process's environment.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 70b2d181b1547dbe3c2a62e57c6afb0ee903f358 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
ee8def7d76
commit
97b990849f
2 changed files with 4 additions and 7 deletions
|
@ -756,12 +756,9 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma
|
||||||
WCHAR env_name[64];
|
WCHAR env_name[64];
|
||||||
swprintf(env_name, ARRAY_SIZE(env_name), L"WINEDLLDIR%u", i);
|
swprintf(env_name, ARRAY_SIZE(env_name), L"WINEDLLDIR%u", i);
|
||||||
if (!(env = process_getenv(process, env_name))) return FALSE;
|
if (!(env = process_getenv(process, env_name))) return FALSE;
|
||||||
len = lstrlenW(env);
|
len = wcslen(env) + wcslen(name) + 2;
|
||||||
if (!(buf = heap_alloc((len + lstrlenW(name) + 2) * sizeof(WCHAR)))) return FALSE;
|
if (!(buf = heap_alloc(len * sizeof(WCHAR)))) return FALSE;
|
||||||
|
swprintf(buf, len, L"%s\\%s", env, name);
|
||||||
len = GetEnvironmentVariableW(env_name, buf, len);
|
|
||||||
buf[len++] = '\\';
|
|
||||||
lstrcpyW(buf + len, name);
|
|
||||||
file = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
file = CreateFileW(buf, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
if (file != INVALID_HANDLE_VALUE)
|
if (file != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 774ee4734a7d6c02f648fdf1747df837c964583d
|
wine: 70b2d181b1547dbe3c2a62e57c6afb0ee903f358
|
||||||
|
|
Loading…
Reference in a new issue