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
b7db0b52
Commit
b7db0b52
authored
Nov 07, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Initialize earlier things that need the executable name.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b95c4c22
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
16 deletions
+12
-16
loader.c
dlls/ntdll/loader.c
+8
-9
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-1
version.c
dlls/ntdll/version.c
+3
-6
No files found.
dlls/ntdll/loader.c
View file @
b7db0b52
...
...
@@ -3832,8 +3832,8 @@ static void load_global_options(void)
attr
.
SecurityQualityOfService
=
NULL
;
RtlInitUnicodeString
(
&
name_str
,
sessionW
);
if
(
NtOpenKey
(
&
hkey
,
KEY_QUERY_VALUE
,
&
attr
))
return
;
if
(
!
NtOpenKey
(
&
hkey
,
KEY_QUERY_VALUE
,
&
attr
))
{
query_dword_option
(
hkey
,
globalflagW
,
&
NtCurrentTeb
()
->
Peb
->
NtGlobalFlag
);
query_dword_option
(
hkey
,
safesearchW
,
&
path_safe_mode
);
query_dword_option
(
hkey
,
safedllmodeW
,
&
dll_safe_mode
);
...
...
@@ -3854,6 +3854,11 @@ static void load_global_options(void)
NtCurrentTeb
()
->
Peb
->
HeapDeCommitFreeBlockThreshold
=
value
;
NtClose
(
hkey
);
}
LdrQueryImageFileExecutionOptions
(
&
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
,
globalflagW
,
REG_DWORD
,
&
NtCurrentTeb
()
->
Peb
->
NtGlobalFlag
,
sizeof
(
DWORD
),
NULL
);
heap_set_debug_flags
(
GetProcessHeap
()
);
}
...
...
@@ -4223,8 +4228,6 @@ void __wine_process_init(void)
static
const
WCHAR
kernel32W
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
's'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'3'
,
'2'
,
'\\'
,
'k'
,
'e'
,
'r'
,
'n'
,
'e'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
globalflagW
[]
=
{
'G'
,
'l'
,
'o'
,
'b'
,
'a'
,
'l'
,
'F'
,
'l'
,
'a'
,
'g'
,
0
};
WINE_MODREF
*
wm
;
NTSTATUS
status
;
ANSI_STRING
func_name
;
...
...
@@ -4239,6 +4242,7 @@ void __wine_process_init(void)
umask
(
FILE_umask
);
load_global_options
();
version_init
();
/* setup the load callback and create ntdll modref */
wine_dll_set_callback
(
load_builtin_callback
);
...
...
@@ -4268,13 +4272,8 @@ void __wine_process_init(void)
}
NtCurrentTeb
()
->
Peb
->
LoaderLock
=
&
loader_section
;
version_init
(
wm
->
ldr
.
FullDllName
.
Buffer
);
virtual_set_large_address_space
();
LdrQueryImageFileExecutionOptions
(
&
wm
->
ldr
.
FullDllName
,
globalflagW
,
REG_DWORD
,
&
NtCurrentTeb
()
->
Peb
->
NtGlobalFlag
,
sizeof
(
DWORD
),
NULL
);
heap_set_debug_flags
(
GetProcessHeap
()
);
/* the main exe needs to be the first in the load order list */
RemoveEntryList
(
&
wm
->
ldr
.
InLoadOrderModuleList
);
InsertHeadList
(
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InLoadOrderModuleList
,
&
wm
->
ldr
.
InLoadOrderModuleList
);
...
...
dlls/ntdll/ntdll_misc.h
View file @
b7db0b52
...
...
@@ -77,7 +77,7 @@ extern void signal_start_thread( LPTHREAD_START_ROUTINE entry, void *arg, BOOL s
extern
void
signal_start_process
(
LPTHREAD_START_ROUTINE
entry
,
BOOL
suspend
)
DECLSPEC_HIDDEN
;
extern
void
DECLSPEC_NORETURN
signal_exit_thread
(
int
status
)
DECLSPEC_HIDDEN
;
extern
void
DECLSPEC_NORETURN
signal_exit_process
(
int
status
)
DECLSPEC_HIDDEN
;
extern
void
version_init
(
const
WCHAR
*
appname
)
DECLSPEC_HIDDEN
;
extern
void
version_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
debug_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
thread_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
actctx_init
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/version.c
View file @
b7db0b52
...
...
@@ -485,7 +485,7 @@ static BOOL parse_win_version( HANDLE hkey )
/**********************************************************************
* version_init
*/
void
version_init
(
const
WCHAR
*
appname
)
void
version_init
(
void
)
{
static
const
WCHAR
configW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
appdefaultsW
[]
=
{
'A'
,
'p'
,
'p'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
's'
,
'\\'
,
0
};
...
...
@@ -493,6 +493,8 @@ void version_init( const WCHAR *appname )
UNICODE_STRING
nameW
;
HANDLE
root
,
hkey
,
config_key
;
BOOL
got_win_ver
=
FALSE
;
const
WCHAR
*
p
,
*
appname
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
.
Buffer
;
WCHAR
appversion
[
MAX_PATH
+
20
];
current_version
=
&
VersionData
[
WIN7
];
...
...
@@ -511,10 +513,6 @@ void version_init( const WCHAR *appname )
if
(
!
config_key
)
goto
done
;
/* open AppDefaults\\appname key */
if
(
appname
&&
*
appname
)
{
const
WCHAR
*
p
;
WCHAR
appversion
[
MAX_PATH
+
20
];
if
((
p
=
strrchrW
(
appname
,
'/'
)))
appname
=
p
+
1
;
if
((
p
=
strrchrW
(
appname
,
'\\'
)))
appname
=
p
+
1
;
...
...
@@ -531,7 +529,6 @@ void version_init( const WCHAR *appname )
got_win_ver
=
parse_win_version
(
hkey
);
NtClose
(
hkey
);
}
}
if
(
!
got_win_ver
)
{
...
...
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