mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
Add the 16-bit system directory if any to the module search path.
This commit is contained in:
parent
cab04351d7
commit
d4441f2817
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue