summaryrefslogtreecommitdiff
path: root/plugins/IEView/src/IEView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEView/src/IEView.cpp')
-rw-r--r--plugins/IEView/src/IEView.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index a2752826f9..d57f9c8582 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -1140,43 +1140,4 @@ void IEView::navigate(IEVIEWNAVIGATE *nav)
navigate(nav->urlW);
else
navigate(nav->url);
-}
-
-VARIANT IEView::CallJScript(const CMString strFunc, size_t nPCount, const CMString strArgs, ...)
-{
- VARIANT vaResult = { 0 };
- CComPtr<IDispatch> spScript;
- if (FAILED(getDocument()->get_Script(&spScript))) return vaResult;
-
- BSTR bstrMember(SysAllocString(strFunc));
- DISPID dispid = NULL;
-
- HRESULT hr = spScript->GetIDsOfNames(IID_NULL, &bstrMember, 1, LOCALE_SYSTEM_DEFAULT, &dispid);
- if (FAILED(hr)) return vaResult;
-
- va_list(args);
- va_start(args, strArgs);
-
- DISPPARAMS dispparams;
- memset(&dispparams, 0, sizeof dispparams);
- dispparams.cArgs = (UINT)nPCount;
- dispparams.rgvarg = new VARIANT[dispparams.cArgs];
- dispparams.cNamedArgs = 0;
-
- for (size_t i = 0; i < nPCount; i++)
- {
- dispparams.rgvarg[i].bstrVal = SysAllocString(va_arg(args, CMString));
- dispparams.rgvarg[i].vt = VT_BSTR;
- }
-
- EXCEPINFO excepInfo = { 0 };
-
- UINT nArgErr = (UINT)-1;
-
- hr = spScript->Invoke(dispid, IID_NULL, 0, DISPATCH_METHOD, &dispparams, &vaResult, &excepInfo, &nArgErr);
-
- for (size_t i = 0; i < nPCount; i++) SysFreeString(dispparams.rgvarg[i].bstrVal);
-
- delete[] dispparams.rgvarg;
- return vaResult;
} \ No newline at end of file