msscript.ocx: Move parse_script_text up.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-06-25 17:59:27 +03:00 committed by Alexandre Julliard
parent f9fb1e3fbe
commit e61a2a2fc0
1 changed files with 14 additions and 14 deletions

View File

@ -291,6 +291,20 @@ static HRESULT add_script_object(ScriptHost *host, BSTR name, IDispatch *object,
return hr;
}
static HRESULT parse_script_text(ScriptHost *host, BSTR script_text, DWORD flag, VARIANT *res)
{
EXCEPINFO excepinfo;
HRESULT hr;
hr = start_script(host);
if (FAILED(hr)) return hr;
hr = IActiveScriptParse_ParseScriptText(host->parse, script_text, NULL,
NULL, NULL, 0, 1, flag, res, &excepinfo);
/* FIXME: more error handling */
return hr;
}
static inline ScriptControl *impl_from_IScriptControl(IScriptControl *iface)
{
return CONTAINING_RECORD(iface, ScriptControl, IScriptControl_iface);
@ -1555,20 +1569,6 @@ static HRESULT WINAPI ScriptControl_Reset(IScriptControl *iface)
return set_script_state(This->host, SCRIPTSTATE_INITIALIZED);
}
static HRESULT parse_script_text(ScriptHost *host, BSTR script_text, DWORD flag, VARIANT *res)
{
EXCEPINFO excepinfo;
HRESULT hr;
hr = start_script(host);
if (FAILED(hr)) return hr;
hr = IActiveScriptParse_ParseScriptText(host->parse, script_text, NULL,
NULL, NULL, 0, 1, flag, res, &excepinfo);
/* FIXME: more error handling */
return hr;
}
static HRESULT WINAPI ScriptControl_AddCode(IScriptControl *iface, BSTR code)
{
ScriptControl *This = impl_from_IScriptControl(iface);