diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index bdf09f375cf..ca06e8931ac 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -91,6 +91,7 @@ static UINT tls_module_count; /* number of modules with TLS directory */ static UINT tls_total_size; /* total size of TLS storage */ static const IMAGE_TLS_DIRECTORY **tls_dirs; /* array of TLS directories */ +UNICODE_STRING windows_dir = { 0, 0, NULL }; /* windows directory */ UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */ static RTL_CRITICAL_SECTION loader_section; @@ -2312,6 +2313,7 @@ void __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir ) PLIST_ENTRY mark, entry; LPWSTR buffer, p; + RtlCreateUnicodeString( &windows_dir, windir ); RtlCreateUnicodeString( &system_dir, sysdir ); strcpyW( user_shared_data->NtSystemRoot, windir ); diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 4f730f7dc4d..8f41ff87e31 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -76,6 +76,7 @@ extern FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY FARPROC origfun, DWORD ordinal, const WCHAR *user ); extern void RELAY_SetupDLL( HMODULE hmod ); extern void SNOOP_SetupDLL( HMODULE hmod ); +extern UNICODE_STRING windows_dir; extern UNICODE_STRING system_dir; /* redefine these to make sure we don't reference kernel symbols */