Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ca13f489
Commit
ca13f489
authored
May 21, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make the windows directory a global variable.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db88a3ec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
actctx.c
dlls/ntdll/actctx.c
+3
-3
env.c
dlls/ntdll/env.c
+0
-2
loader.c
dlls/ntdll/loader.c
+4
-2
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
thread.c
dlls/ntdll/thread.c
+1
-2
No files found.
dlls/ntdll/actctx.c
View file @
ca13f489
...
...
@@ -3189,11 +3189,11 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
if
(
!
ai
->
arch
||
!
ai
->
name
||
!
ai
->
public_key
)
return
STATUS_NO_SUCH_FILE
;
if
(
!
(
path
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
manifest_dirW
)
+
wcslen
(
user_shared_data
->
NtSystemRoot
)
*
sizeof
(
WCHAR
)
)))
wcslen
(
windows_dir
)
*
sizeof
(
WCHAR
)
)))
return
STATUS_NO_MEMORY
;
wcscpy
(
path
,
user_shared_data
->
NtSystemRoot
);
memcpy
(
path
+
wcslen
(
path
),
manifest_dirW
,
sizeof
(
manifest_dirW
)
);
wcscpy
(
path
,
windows_dir
);
wcscat
(
path
,
manifest_dirW
);
if
(
!
RtlDosPathNameToNtPathName_U
(
path
,
&
path_us
,
NULL
,
NULL
))
{
...
...
dlls/ntdll/env.c
View file @
ca13f489
...
...
@@ -50,8 +50,6 @@ static const UNICODE_STRING null_str = { 0, 0, NULL };
static
const
BOOL
is_win64
=
(
sizeof
(
void
*
)
>
sizeof
(
int
));
static
const
WCHAR
windows_dir
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
static
BOOL
first_prefix_start
;
/* first ever process start in this prefix? */
static
inline
SIZE_T
get_env_length
(
const
WCHAR
*
env
)
...
...
dlls/ntdll/loader.c
View file @
ca13f489
...
...
@@ -69,6 +69,8 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_DATA_TABLE_ENTRY *, void *, BOOLEAN *)
const
struct
unix_funcs
*
unix_funcs
=
NULL
;
/* windows directory */
const
WCHAR
windows_dir
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
/* system directory with trailing backslash */
const
WCHAR
system_dir
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'3'
,
'2'
,
'\\'
,
0
};
...
...
@@ -2870,7 +2872,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
goto
done
;
}
needed
=
(
wcslen
(
user_shared_data
->
NtSystemRoot
)
*
sizeof
(
WCHAR
)
+
needed
=
(
wcslen
(
windows_dir
)
*
sizeof
(
WCHAR
)
+
sizeof
(
winsxsW
)
+
info
->
ulAssemblyDirectoryNameLength
+
nameW
.
Length
+
2
*
sizeof
(
WCHAR
));
if
(
!
(
*
fullname
=
p
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
needed
)))
...
...
@@ -2878,7 +2880,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
status
=
STATUS_NO_MEMORY
;
goto
done
;
}
wcscpy
(
p
,
user_shared_data
->
NtSystemRoot
);
wcscpy
(
p
,
windows_dir
);
p
+=
wcslen
(
p
);
memcpy
(
p
,
winsxsW
,
sizeof
(
winsxsW
)
);
p
+=
ARRAY_SIZE
(
winsxsW
);
...
...
dlls/ntdll/ntdll_misc.h
View file @
ca13f489
...
...
@@ -144,6 +144,7 @@ extern FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY
FARPROC
origfun
,
DWORD
ordinal
,
const
WCHAR
*
user
)
DECLSPEC_HIDDEN
;
extern
void
RELAY_SetupDLL
(
HMODULE
hmod
)
DECLSPEC_HIDDEN
;
extern
void
SNOOP_SetupDLL
(
HMODULE
hmod
)
DECLSPEC_HIDDEN
;
extern
const
WCHAR
windows_dir
[]
DECLSPEC_HIDDEN
;
extern
const
WCHAR
system_dir
[]
DECLSPEC_HIDDEN
;
extern
const
WCHAR
syswow64_dir
[]
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/thread.c
View file @
ca13f489
...
...
@@ -54,7 +54,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(thread);
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
NULL
;
static
size_t
user_shared_data_size
;
static
const
WCHAR
default_windirW
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
void
(
WINAPI
*
kernel32_start_process
)(
LPTHREAD_START_ROUTINE
,
void
*
)
=
NULL
;
...
...
@@ -275,7 +274,7 @@ TEB *thread_init(void)
}
user_shared_data
=
addr
;
user_shared_data_size
=
size
;
memcpy
(
user_shared_data
->
NtSystemRoot
,
default_windirW
,
sizeof
(
default_windirW
)
);
wcscpy
(
user_shared_data
->
NtSystemRoot
,
windows_dir
);
/* allocate and initialize the PEB and initial TEB */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment