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
c258b5ef
Commit
c258b5ef
authored
Oct 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add the new image path to the dll path for a new process.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9551cb0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
process.c
dlls/kernel32/process.c
+7
-3
No files found.
dlls/kernel32/process.c
View file @
c258b5ef
...
@@ -1885,9 +1885,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
...
@@ -1885,9 +1885,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
const
STARTUPINFOW
*
startup
)
const
STARTUPINFOW
*
startup
)
{
{
RTL_USER_PROCESS_PARAMETERS
*
params
;
RTL_USER_PROCESS_PARAMETERS
*
params
;
UNICODE_STRING
imageW
,
curdirW
,
cmdlineW
,
titleW
,
desktopW
,
runtimeW
,
newdirW
;
UNICODE_STRING
imageW
,
dllpathW
,
curdirW
,
cmdlineW
,
titleW
,
desktopW
,
runtimeW
,
newdirW
;
WCHAR
imagepath
[
MAX_PATH
];
WCHAR
imagepath
[
MAX_PATH
];
WCHAR
*
envW
=
env
;
WCHAR
*
load_path
,
*
dummy
,
*
envW
=
env
;
if
(
!
GetLongPathNameW
(
filename
,
imagepath
,
MAX_PATH
))
if
(
!
GetLongPathNameW
(
filename
,
imagepath
,
MAX_PATH
))
lstrcpynW
(
imagepath
,
filename
,
MAX_PATH
);
lstrcpynW
(
imagepath
,
filename
,
MAX_PATH
);
...
@@ -1914,20 +1914,24 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
...
@@ -1914,20 +1914,24 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
else
else
cur_dir
=
NULL
;
cur_dir
=
NULL
;
}
}
LdrGetDllPath
(
imagepath
,
LOAD_WITH_ALTERED_SEARCH_PATH
,
&
load_path
,
&
dummy
);
RtlInitUnicodeString
(
&
imageW
,
imagepath
);
RtlInitUnicodeString
(
&
imageW
,
imagepath
);
RtlInitUnicodeString
(
&
dllpathW
,
load_path
);
RtlInitUnicodeString
(
&
curdirW
,
cur_dir
);
RtlInitUnicodeString
(
&
curdirW
,
cur_dir
);
RtlInitUnicodeString
(
&
cmdlineW
,
cmdline
);
RtlInitUnicodeString
(
&
cmdlineW
,
cmdline
);
RtlInitUnicodeString
(
&
titleW
,
startup
->
lpTitle
?
startup
->
lpTitle
:
imagepath
);
RtlInitUnicodeString
(
&
titleW
,
startup
->
lpTitle
?
startup
->
lpTitle
:
imagepath
);
RtlInitUnicodeString
(
&
desktopW
,
startup
->
lpDesktop
);
RtlInitUnicodeString
(
&
desktopW
,
startup
->
lpDesktop
);
runtimeW
.
Buffer
=
(
WCHAR
*
)
startup
->
lpReserved2
;
runtimeW
.
Buffer
=
(
WCHAR
*
)
startup
->
lpReserved2
;
runtimeW
.
Length
=
runtimeW
.
MaximumLength
=
startup
->
cbReserved2
;
runtimeW
.
Length
=
runtimeW
.
MaximumLength
=
startup
->
cbReserved2
;
if
(
RtlCreateProcessParametersEx
(
&
params
,
&
imageW
,
NULL
,
cur_dir
?
&
curdirW
:
NULL
,
if
(
RtlCreateProcessParametersEx
(
&
params
,
&
imageW
,
&
dllpathW
,
cur_dir
?
&
curdirW
:
NULL
,
&
cmdlineW
,
envW
,
&
titleW
,
&
desktopW
,
&
cmdlineW
,
envW
,
&
titleW
,
&
desktopW
,
NULL
,
&
runtimeW
,
PROCESS_PARAMS_FLAG_NORMALIZED
))
NULL
,
&
runtimeW
,
PROCESS_PARAMS_FLAG_NORMALIZED
))
{
{
RtlReleasePath
(
load_path
);
if
(
envW
!=
env
)
HeapFree
(
GetProcessHeap
(),
0
,
envW
);
if
(
envW
!=
env
)
HeapFree
(
GetProcessHeap
(),
0
,
envW
);
return
NULL
;
return
NULL
;
}
}
RtlReleasePath
(
load_path
);
if
(
flags
&
CREATE_NEW_PROCESS_GROUP
)
params
->
ConsoleFlags
=
1
;
if
(
flags
&
CREATE_NEW_PROCESS_GROUP
)
params
->
ConsoleFlags
=
1
;
if
(
flags
&
CREATE_NEW_CONSOLE
)
params
->
ConsoleHandle
=
KERNEL32_CONSOLE_ALLOC
;
if
(
flags
&
CREATE_NEW_CONSOLE
)
params
->
ConsoleHandle
=
KERNEL32_CONSOLE_ALLOC
;
...
...
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