Commit d4441f28 authored by Alexandre Julliard's avatar Alexandre Julliard

Add the 16-bit system directory if any to the module search path.

parent cab04351
......@@ -617,13 +617,20 @@ static const WCHAR *get_dll_system_path(void)
WCHAR *p, *path;
int len = 3;
len += GetSystemDirectoryW( NULL, 0 );
len += 2 * GetSystemDirectoryW( NULL, 0 );
len += GetWindowsDirectoryW( NULL, 0 );
p = path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
*p++ = '.';
*p++ = ';';
GetSystemDirectoryW( p, path + len - p);
p += strlenW(p);
/* if system directory ends in "32" add 16-bit version too */
if (p[-2] == '3' && p[-1] == '2')
{
*p++ = ';';
GetSystemDirectoryW( p, path + len - p);
p += strlenW(p) - 2;
}
*p++ = ';';
GetWindowsDirectoryW( p, path + len - p);
cached_path = path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment