Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
42df4dcc
Commit
42df4dcc
authored
Feb 14, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return the kernel process start address from __wine_kernel_init().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
698b26a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
process.c
dlls/kernel32/process.c
+2
-2
loader.c
dlls/ntdll/loader.c
+5
-4
No files found.
dlls/kernel32/process.c
View file @
42df4dcc
...
...
@@ -1336,7 +1336,7 @@ static void set_process_name( int argc, char *argv[] )
*
* Wine initialisation: load and start the main exe file.
*/
void
CDECL
__wine_kernel_init
(
void
)
void
*
CDECL
__wine_kernel_init
(
void
)
{
static
const
WCHAR
kernel32W
[]
=
{
'k'
,
'e'
,
'r'
,
'n'
,
'e'
,
'l'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
dotW
[]
=
{
'.'
,
0
};
...
...
@@ -1458,7 +1458,7 @@ void CDECL __wine_kernel_init(void)
if
(
!
params
->
CurrentDirectory
.
Handle
)
chdir
(
"/"
);
/* avoid locking removable devices */
LdrInitializeThunk
(
start_process_wrapper
,
0
,
0
,
0
)
;
return
start_process_wrapper
;
error:
ExitProcess
(
GetLastError
()
);
...
...
dlls/ntdll/loader.c
View file @
42df4dcc
...
...
@@ -3386,8 +3386,6 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
WINE_MODREF
*
wm
;
PEB
*
peb
=
NtCurrentTeb
()
->
Peb
;
kernel32_start_process
=
kernel_start
;
/* allocate the modref for the main exe (if not already done) */
wm
=
get_modref
(
peb
->
ImageBaseAddress
);
assert
(
wm
);
...
...
@@ -3558,7 +3556,7 @@ void __wine_process_init(void)
NTSTATUS
status
;
ANSI_STRING
func_name
;
UNICODE_STRING
nt_name
;
void
(
*
DECLSPEC_NORETURN
CDECL
init_func
)(
void
);
void
*
(
CDECL
*
init_func
)(
void
);
thread_init
();
...
...
@@ -3584,5 +3582,8 @@ void __wine_process_init(void)
MESSAGE
(
"wine: could not find __wine_kernel_init in kernel32.dll, status %x
\n
"
,
status
);
exit
(
1
);
}
init_func
();
kernel32_start_process
=
init_func
();
LdrInitializeThunk
(
NULL
,
0
,
0
,
0
);
}
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