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
a95d7f6c
Commit
a95d7f6c
authored
Feb 13, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Recreate the process parameters structure once everything has been initialized.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
50f0ed75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
env.c
dlls/ntdll/env.c
+41
-0
loader.c
dlls/ntdll/loader.c
+1
-3
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
No files found.
dlls/ntdll/env.c
View file @
a95d7f6c
...
...
@@ -669,3 +669,44 @@ void init_user_process_params( SIZE_T data_size )
done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
info
);
}
/***********************************************************************
* update_user_process_params
*
* Rebuild the RTL_USER_PROCESS_PARAMETERS structure once we have initialized all the fields.
*/
void
update_user_process_params
(
const
UNICODE_STRING
*
image
)
{
RTL_USER_PROCESS_PARAMETERS
*
params
,
*
cur_params
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
;
UNICODE_STRING
title
=
cur_params
->
WindowTitle
;
WCHAR
*
env
=
cur_params
->
Environment
;
cur_params
->
Environment
=
NULL
;
/* avoid copying it */
if
(
!
title
.
Buffer
)
title
=
*
image
;
if
(
RtlCreateProcessParametersEx
(
&
params
,
image
,
&
cur_params
->
DllPath
,
NULL
,
&
cur_params
->
CommandLine
,
NULL
,
&
title
,
&
cur_params
->
Desktop
,
&
cur_params
->
ShellInfo
,
&
cur_params
->
RuntimeInfo
,
PROCESS_PARAMS_FLAG_NORMALIZED
))
return
;
params
->
DebugFlags
=
cur_params
->
DebugFlags
;
params
->
ConsoleHandle
=
cur_params
->
ConsoleHandle
;
params
->
ConsoleFlags
=
cur_params
->
ConsoleFlags
;
params
->
hStdInput
=
cur_params
->
hStdInput
;
params
->
hStdOutput
=
cur_params
->
hStdOutput
;
params
->
hStdError
=
cur_params
->
hStdError
;
params
->
dwX
=
cur_params
->
dwX
;
params
->
dwY
=
cur_params
->
dwY
;
params
->
dwXSize
=
cur_params
->
dwXSize
;
params
->
dwYSize
=
cur_params
->
dwYSize
;
params
->
dwXCountChars
=
cur_params
->
dwXCountChars
;
params
->
dwYCountChars
=
cur_params
->
dwYCountChars
;
params
->
dwFillAttribute
=
cur_params
->
dwFillAttribute
;
params
->
dwFlags
=
cur_params
->
dwFlags
;
params
->
wShowWindow
=
cur_params
->
wShowWindow
;
params
->
Environment
=
env
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
cur_params
);
NtCurrentTeb
()
->
Peb
->
ProcessParameters
=
params
;
}
dlls/ntdll/loader.c
View file @
a95d7f6c
...
...
@@ -3398,9 +3398,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
}
peb
->
LoaderLock
=
&
loader_section
;
peb
->
ProcessParameters
->
ImagePathName
=
wm
->
ldr
.
FullDllName
;
if
(
!
peb
->
ProcessParameters
->
WindowTitle
.
Buffer
)
peb
->
ProcessParameters
->
WindowTitle
=
wm
->
ldr
.
FullDllName
;
update_user_process_params
(
&
wm
->
ldr
.
FullDllName
);
version_init
(
wm
->
ldr
.
FullDllName
.
Buffer
);
virtual_set_large_address_space
();
...
...
dlls/ntdll/ntdll_misc.h
View file @
a95d7f6c
...
...
@@ -81,6 +81,7 @@ extern void virtual_init_threading(void) DECLSPEC_HIDDEN;
extern
void
fill_cpu_info
(
void
)
DECLSPEC_HIDDEN
;
extern
void
heap_set_debug_flags
(
HANDLE
handle
)
DECLSPEC_HIDDEN
;
extern
void
init_user_process_params
(
SIZE_T
data_size
)
DECLSPEC_HIDDEN
;
extern
void
update_user_process_params
(
const
UNICODE_STRING
*
image
)
DECLSPEC_HIDDEN
;
/* server support */
extern
timeout_t
server_start_time
DECLSPEC_HIDDEN
;
...
...
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