summaryrefslogtreecommitdiff
path: root/plugins/IEView/src/external_funcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEView/src/external_funcs.cpp')
-rw-r--r--plugins/IEView/src/external_funcs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/IEView/src/external_funcs.cpp b/plugins/IEView/src/external_funcs.cpp
index 34c2ff5dad..445c2e5df1 100644
--- a/plugins/IEView/src/external_funcs.cpp
+++ b/plugins/IEView/src/external_funcs.cpp
@@ -42,8 +42,19 @@ namespace External
return S_OK;
}
- HRESULT ShellExec(DISPPARAMS *pDispParams, VARIANT *pVarResult)
+ HRESULT win32_ShellExecute(DISPPARAMS *pDispParams, VARIANT *pVarResult)
{
+ if (pDispParams->cArgs < 5 || pDispParams == nullptr)
+ return E_INVALIDARG;
+
+ HINSTANCE res = ShellExecuteW(NULL, pDispParams->rgvarg[4].bstrVal, pDispParams->rgvarg[3].bstrVal, pDispParams->rgvarg[2].bstrVal, pDispParams->rgvarg[1].bstrVal, pDispParams->rgvarg[0].intVal);
+
+ if (pVarResult != nullptr)
+ {
+ pVarResult->vt = VT_HANDLE;
+ pVarResult->ullVal = (ULONGLONG)res;
+ }
+
return S_OK;
}