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
98f546ed
Commit
98f546ed
authored
Aug 17, 2022
by
Robert Wilhelm
Committed by
Alexandre Julliard
Aug 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom: Support default style argument in IWshShell3::Run.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53565
parent
6f7d0625
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
shell.c
dlls/wshom.ocx/shell.c
+13
-12
wshom.c
dlls/wshom.ocx/tests/wshom.c
+1
-1
No files found.
dlls/wshom.ocx/shell.c
View file @
98f546ed
...
@@ -1332,9 +1332,9 @@ static WCHAR *split_command( BSTR cmd, WCHAR **params )
...
@@ -1332,9 +1332,9 @@ static WCHAR *split_command( BSTR cmd, WCHAR **params )
static
HRESULT
WINAPI
WshShell3_Run
(
IWshShell3
*
iface
,
BSTR
cmd
,
VARIANT
*
style
,
VARIANT
*
wait
,
int
*
exit_code
)
static
HRESULT
WINAPI
WshShell3_Run
(
IWshShell3
*
iface
,
BSTR
cmd
,
VARIANT
*
style
,
VARIANT
*
wait
,
int
*
exit_code
)
{
{
SHELLEXECUTEINFOW
info
;
SHELLEXECUTEINFOW
info
;
int
waitforprocess
;
int
waitforprocess
,
show
;
WCHAR
*
file
,
*
params
;
WCHAR
*
file
,
*
params
;
VARIANT
s
;
VARIANT
v
;
HRESULT
hr
;
HRESULT
hr
;
BOOL
ret
;
BOOL
ret
;
...
@@ -1343,25 +1343,26 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
...
@@ -1343,25 +1343,26 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
if
(
!
style
||
!
wait
||
!
exit_code
)
if
(
!
style
||
!
wait
||
!
exit_code
)
return
E_POINTER
;
return
E_POINTER
;
VariantInit
(
&
s
);
if
(
is_optional_argument
(
style
))
hr
=
VariantChangeType
(
&
s
,
style
,
0
,
VT_I4
);
show
=
SW_SHOWNORMAL
;
else
{
VariantInit
(
&
v
);
hr
=
VariantChangeType
(
&
v
,
style
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
ERR
(
"failed to convert style argument, %#lx
\n
"
,
hr
);
return
hr
;
return
hr
;
show
=
V_I4
(
&
v
);
}
}
if
(
is_optional_argument
(
wait
))
if
(
is_optional_argument
(
wait
))
waitforprocess
=
0
;
waitforprocess
=
0
;
else
{
else
{
VARIANT
w
;
VariantInit
(
&
v
);
hr
=
VariantChangeType
(
&
v
,
wait
,
0
,
VT_I4
);
VariantInit
(
&
w
);
hr
=
VariantChangeType
(
&
w
,
wait
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
waitforprocess
=
V_I4
(
&
w
);
waitforprocess
=
V_I4
(
&
v
);
}
}
if
(
!
(
file
=
split_command
(
cmd
,
&
params
)))
return
E_OUTOFMEMORY
;
if
(
!
(
file
=
split_command
(
cmd
,
&
params
)))
return
E_OUTOFMEMORY
;
...
@@ -1371,7 +1372,7 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
...
@@ -1371,7 +1372,7 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style,
info
.
fMask
=
waitforprocess
?
SEE_MASK_NOASYNC
|
SEE_MASK_NOCLOSEPROCESS
:
SEE_MASK_DEFAULT
;
info
.
fMask
=
waitforprocess
?
SEE_MASK_NOASYNC
|
SEE_MASK_NOCLOSEPROCESS
:
SEE_MASK_DEFAULT
;
info
.
lpFile
=
file
;
info
.
lpFile
=
file
;
info
.
lpParameters
=
params
;
info
.
lpParameters
=
params
;
info
.
nShow
=
V_I4
(
&
s
)
;
info
.
nShow
=
show
;
ret
=
ShellExecuteExW
(
&
info
);
ret
=
ShellExecuteExW
(
&
info
);
free
(
file
);
free
(
file
);
...
...
dlls/wshom.ocx/tests/wshom.c
View file @
98f546ed
...
@@ -251,7 +251,7 @@ static void test_wshshell(void)
...
@@ -251,7 +251,7 @@ static void test_wshshell(void)
retval
=
0xdeadbeef
;
retval
=
0xdeadbeef
;
str
=
SysAllocString
(
L"cmd.exe /c rd /s /q c:
\\
nosuchdir"
);
str
=
SysAllocString
(
L"cmd.exe /c rd /s /q c:
\\
nosuchdir"
);
hr
=
IWshShell3_Run
(
sh3
,
str
,
&
arg
,
&
arg2
,
&
retval
);
hr
=
IWshShell3_Run
(
sh3
,
str
,
&
arg
,
&
arg2
,
&
retval
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
retval
==
ERROR_FILE_NOT_FOUND
,
"Unexpected retval %d.
\n
"
,
retval
);
todo_wine
ok
(
retval
==
ERROR_FILE_NOT_FOUND
,
"Unexpected retval %d.
\n
"
,
retval
);
SysFreeString
(
str
);
SysFreeString
(
str
);
...
...
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