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
5db4741d
Commit
5db4741d
authored
Feb 26, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom: Implement IWshShell3::Run().
parent
cf12f51b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
3 deletions
+57
-3
shell.c
dlls/wshom.ocx/shell.c
+56
-3
shellapi.h
include/shellapi.h
+1
-0
No files found.
dlls/wshom.ocx/shell.c
View file @
5db4741d
...
...
@@ -19,6 +19,7 @@
#include "wshom_private.h"
#include "wshom.h"
#include "shellapi.h"
#include "shlobj.h"
#include "wine/debug.h"
...
...
@@ -665,10 +666,62 @@ static HRESULT WINAPI WshShell3_get_Environment(IWshShell3 *iface, VARIANT *Type
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshShell3_Run
(
IWshShell3
*
iface
,
BSTR
Command
,
VARIANT
*
WindowStyle
,
VARIANT
*
WaitOnReturn
,
int
*
out_ExitC
ode
)
static
HRESULT
WINAPI
WshShell3_Run
(
IWshShell3
*
iface
,
BSTR
cmd
,
VARIANT
*
style
,
VARIANT
*
WaitOnReturn
,
int
*
exit_c
ode
)
{
FIXME
(
"(%s %s %p): stub
\n
"
,
debugstr_variant
(
WindowStyle
),
debugstr_variant
(
WaitOnReturn
),
out_ExitCode
);
return
E_NOTIMPL
;
SHELLEXECUTEINFOW
info
;
int
waitforprocess
;
VARIANT
s
,
w
;
HRESULT
hr
;
TRACE
(
"(%s %s %s %p)
\n
"
,
debugstr_w
(
cmd
),
debugstr_variant
(
style
),
debugstr_variant
(
WaitOnReturn
),
exit_code
);
VariantInit
(
&
s
);
hr
=
VariantChangeType
(
&
s
,
style
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
{
ERR
(
"failed to convert style argument, 0x%08x
\n
"
,
hr
);
return
hr
;
}
VariantInit
(
&
w
);
hr
=
VariantChangeType
(
&
w
,
WaitOnReturn
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
{
ERR
(
"failed to convert wait argument, 0x%08x
\n
"
,
hr
);
return
hr
;
}
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
cbSize
=
sizeof
(
info
);
waitforprocess
=
V_I4
(
&
w
);
info
.
fMask
=
waitforprocess
?
SEE_MASK_NOASYNC
|
SEE_MASK_NOCLOSEPROCESS
:
SEE_MASK_DEFAULT
;
info
.
lpFile
=
cmd
;
info
.
nShow
=
V_I4
(
&
s
);
if
(
!
ShellExecuteExW
(
&
info
))
{
TRACE
(
"ShellExecute failed, %d
\n
"
,
GetLastError
());
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
else
{
if
(
waitforprocess
)
{
if
(
exit_code
)
{
DWORD
code
;
GetExitCodeProcess
(
info
.
hProcess
,
&
code
);
*
exit_code
=
code
;
}
CloseHandle
(
info
.
hProcess
);
}
else
if
(
exit_code
)
*
exit_code
=
0
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
WshShell3_Popup
(
IWshShell3
*
iface
,
BSTR
Text
,
VARIANT
*
SecondsToWait
,
VARIANT
*
Title
,
VARIANT
*
Type
,
int
*
button
)
...
...
include/shellapi.h
View file @
5db4741d
...
...
@@ -273,6 +273,7 @@ HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
#define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31
#define SEE_MASK_DEFAULT 0x00000000
#define SEE_MASK_CLASSNAME 0x00000001
#define SEE_MASK_CLASSKEY 0x00000003
#define SEE_MASK_IDLIST 0x00000004
...
...
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