[PATCH] shell32: Implement IShellDispatch2::ShellExecute

Andrew Eikum aeikum at codeweavers.com
Fri Oct 16 09:54:36 CDT 2015


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
 dlls/shell32/shelldispatch.c | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index f5eca28..a8135ae 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -1569,11 +1569,30 @@ static HRESULT WINAPI ShellDispatch_IsRestricted(IShellDispatch6 *iface, BSTR gr
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI ShellDispatch_ShellExecute(IShellDispatch6 *iface, BSTR file, VARIANT args, VARIANT dir,
-        VARIANT op, VARIANT show)
+static HRESULT WINAPI ShellDispatch_ShellExecute(IShellDispatch6 *iface, BSTR file, VARIANT v_args, VARIANT v_dir,
+        VARIANT v_op, VARIANT v_show)
 {
-    FIXME("(%s): stub\n", debugstr_w(file));
-    return E_NOTIMPL;
+    WCHAR *op = NULL, *args = NULL, *dir = NULL;
+    INT show = 0;
+
+    TRACE("(%s, %s, %s, %s, %s): stub\n", debugstr_w(file), debugstr_variant(&v_args),
+            debugstr_variant(&v_dir), debugstr_variant(&v_op), debugstr_variant(&v_show));
+
+    if (V_VT(&v_op) == VT_BSTR)
+        op = V_BSTR(&v_op);
+
+    if (V_VT(&v_args) == VT_BSTR)
+        args = V_BSTR(&v_args);
+
+    if (V_VT(&v_dir) == VT_BSTR)
+        dir = V_BSTR(&v_dir);
+
+    if (V_VT(&v_show) == VT_INT)
+        show = V_INT(&v_show);
+
+    ShellExecuteW(NULL, op, file, args, dir, show);
+
+    return S_OK;
 }
 
 static HRESULT WINAPI ShellDispatch_FindPrinter(IShellDispatch6 *iface, BSTR name, BSTR location, BSTR model)
-- 
2.6.1




More information about the wine-patches mailing list