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
dc0ec550
Commit
dc0ec550
authored
Sep 28, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Create a fresh PE info structure when running winevdm.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a659194e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
process.c
dlls/kernel32/process.c
+8
-8
No files found.
dlls/kernel32/process.c
View file @
dc0ec550
...
@@ -2425,14 +2425,14 @@ error:
...
@@ -2425,14 +2425,14 @@ error:
static
BOOL
create_vdm_process
(
LPCWSTR
filename
,
LPWSTR
cmd_line
,
LPWSTR
env
,
LPCWSTR
cur_dir
,
static
BOOL
create_vdm_process
(
LPCWSTR
filename
,
LPWSTR
cmd_line
,
LPWSTR
env
,
LPCWSTR
cur_dir
,
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
BOOL
inherit
,
DWORD
flags
,
LPSTARTUPINFOW
startup
,
BOOL
inherit
,
DWORD
flags
,
LPSTARTUPINFOW
startup
,
LPPROCESS_INFORMATION
info
,
LPCSTR
unixdir
,
LPPROCESS_INFORMATION
info
,
LPCSTR
unixdir
,
int
exec_only
)
const
pe_image_info_t
*
pe_info
,
int
exec_only
)
{
{
static
const
WCHAR
argsW
[]
=
{
'%'
,
's'
,
' '
,
'-'
,
'-'
,
'a'
,
'p'
,
'p'
,
'-'
,
'n'
,
'a'
,
'm'
,
'e'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
' '
,
'%'
,
's'
,
0
};
static
const
WCHAR
argsW
[]
=
{
'%'
,
's'
,
' '
,
'-'
,
'-'
,
'a'
,
'p'
,
'p'
,
'-'
,
'n'
,
'a'
,
'm'
,
'e'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
' '
,
'%'
,
's'
,
0
};
BOOL
ret
;
BOOL
ret
;
WCHAR
buffer
[
MAX_PATH
];
WCHAR
buffer
[
MAX_PATH
];
LPWSTR
new_cmd_line
;
LPWSTR
new_cmd_line
;
pe_image_info_t
pe_info
;
if
(
!
(
ret
=
GetFullPathNameW
(
filename
,
MAX_PATH
,
buffer
,
NULL
)))
if
(
!
(
ret
=
GetFullPathNameW
(
filename
,
MAX_PATH
,
buffer
,
NULL
)))
return
FALSE
;
return
FALSE
;
...
@@ -2446,8 +2446,10 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
...
@@ -2446,8 +2446,10 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
return
FALSE
;
return
FALSE
;
}
}
sprintfW
(
new_cmd_line
,
argsW
,
winevdmW
,
buffer
,
cmd_line
);
sprintfW
(
new_cmd_line
,
argsW
,
winevdmW
,
buffer
,
cmd_line
);
memset
(
&
pe_info
,
0
,
sizeof
(
pe_info
)
);
pe_info
.
machine
=
IMAGE_FILE_MACHINE_I386
;
ret
=
create_process
(
0
,
winevdmW
,
new_cmd_line
,
env
,
cur_dir
,
psa
,
tsa
,
inherit
,
ret
=
create_process
(
0
,
winevdmW
,
new_cmd_line
,
env
,
cur_dir
,
psa
,
tsa
,
inherit
,
flags
,
startup
,
info
,
unixdir
,
pe_info
,
exec_only
);
flags
,
startup
,
info
,
unixdir
,
&
pe_info
,
exec_only
);
HeapFree
(
GetProcessHeap
(),
0
,
new_cmd_line
);
HeapFree
(
GetProcessHeap
(),
0
,
new_cmd_line
);
return
ret
;
return
ret
;
}
}
...
@@ -2678,7 +2680,7 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
...
@@ -2678,7 +2680,7 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
case
BINARY_WIN16
:
case
BINARY_WIN16
:
TRACE
(
"starting %s as Win16/DOS binary
\n
"
,
debugstr_w
(
name
)
);
TRACE
(
"starting %s as Win16/DOS binary
\n
"
,
debugstr_w
(
name
)
);
retv
=
create_vdm_process
(
name
,
tidy_cmdline
,
envW
,
cur_dir
,
process_attr
,
thread_attr
,
retv
=
create_vdm_process
(
name
,
tidy_cmdline
,
envW
,
cur_dir
,
process_attr
,
thread_attr
,
inherit
,
flags
,
startup_info
,
info
,
unixdir
,
&
pe_info
,
FALSE
);
inherit
,
flags
,
startup_info
,
info
,
unixdir
,
FALSE
);
break
;
break
;
case
BINARY_UNIX_LIB
:
case
BINARY_UNIX_LIB
:
TRACE
(
"starting %s as %d-bit Winelib app
\n
"
,
TRACE
(
"starting %s as %d-bit Winelib app
\n
"
,
...
@@ -2693,9 +2695,8 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
...
@@ -2693,9 +2695,8 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
if
(
!
strcmpiW
(
p
,
comW
)
||
!
strcmpiW
(
p
,
pifW
))
if
(
!
strcmpiW
(
p
,
comW
)
||
!
strcmpiW
(
p
,
pifW
))
{
{
TRACE
(
"starting %s as DOS binary
\n
"
,
debugstr_w
(
name
)
);
TRACE
(
"starting %s as DOS binary
\n
"
,
debugstr_w
(
name
)
);
pe_info
.
machine
=
IMAGE_FILE_MACHINE_I386
;
retv
=
create_vdm_process
(
name
,
tidy_cmdline
,
envW
,
cur_dir
,
process_attr
,
thread_attr
,
retv
=
create_vdm_process
(
name
,
tidy_cmdline
,
envW
,
cur_dir
,
process_attr
,
thread_attr
,
inherit
,
flags
,
startup_info
,
info
,
unixdir
,
&
pe_info
,
FALSE
);
inherit
,
flags
,
startup_info
,
info
,
unixdir
,
FALSE
);
break
;
break
;
}
}
if
(
!
strcmpiW
(
p
,
batW
)
||
!
strcmpiW
(
p
,
cmdW
)
)
if
(
!
strcmpiW
(
p
,
batW
)
||
!
strcmpiW
(
p
,
cmdW
)
)
...
@@ -2829,12 +2830,11 @@ static void exec_process( LPCWSTR name )
...
@@ -2829,12 +2830,11 @@ static void exec_process( LPCWSTR name )
/* check for .com or .pif extension */
/* check for .com or .pif extension */
if
(
!
(
p
=
strrchrW
(
name
,
'.'
)))
break
;
if
(
!
(
p
=
strrchrW
(
name
,
'.'
)))
break
;
if
(
strcmpiW
(
p
,
comW
)
&&
strcmpiW
(
p
,
pifW
))
break
;
if
(
strcmpiW
(
p
,
comW
)
&&
strcmpiW
(
p
,
pifW
))
break
;
pe_info
.
machine
=
IMAGE_FILE_MACHINE_I386
;
/* fall through */
/* fall through */
case
BINARY_WIN16
:
case
BINARY_WIN16
:
TRACE
(
"starting %s as Win16/DOS binary
\n
"
,
debugstr_w
(
name
)
);
TRACE
(
"starting %s as Win16/DOS binary
\n
"
,
debugstr_w
(
name
)
);
create_vdm_process
(
name
,
GetCommandLineW
(),
NULL
,
NULL
,
NULL
,
NULL
,
create_vdm_process
(
name
,
GetCommandLineW
(),
NULL
,
NULL
,
NULL
,
NULL
,
FALSE
,
0
,
&
startup_info
,
&
info
,
NULL
,
&
pe_info
,
TRUE
);
FALSE
,
0
,
&
startup_info
,
&
info
,
NULL
,
TRUE
);
break
;
break
;
default:
default:
break
;
break
;
...
...
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