Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/msscript.ocx/msscript.c | 10 ++++++++-- dlls/msscript.ocx/tests/msscript.c | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index 288056b..dcea967 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -127,6 +127,7 @@ typedef struct { HRESULT number; BSTR source; BSTR desc; + BSTR help_file;
BOOLEAN info_filled; } ScriptError; @@ -2134,6 +2135,7 @@ static void fill_error_info(ScriptError *error) error->number = info.scode; error->source = info.bstrSource; error->desc = info.bstrDescription; + error->help_file = info.bstrHelpFile; }
static HRESULT WINAPI ScriptError_QueryInterface(IScriptError *iface, REFIID riid, void **ppv) @@ -2280,9 +2282,11 @@ static HRESULT WINAPI ScriptError_get_HelpFile(IScriptError *iface, BSTR *pbstrH { ScriptError *This = impl_from_IScriptError(iface);
- FIXME("(%p)->(%p)\n", This, pbstrHelpFile); + TRACE("(%p)->(%p)\n", This, pbstrHelpFile);
- return E_NOTIMPL; + fill_error_info(This); + *pbstrHelpFile = SysAllocString(This->help_file); + return S_OK; }
static HRESULT WINAPI ScriptError_get_HelpContext(IScriptError *iface, LONG *plHelpContext) @@ -2334,10 +2338,12 @@ static HRESULT WINAPI ScriptError_Clear(IScriptError *iface) } SysFreeString(This->source); SysFreeString(This->desc); + SysFreeString(This->help_file);
This->number = 0; This->source = NULL; This->desc = NULL; + This->help_file = NULL;
This->info_filled = FALSE; return S_OK; diff --git a/dlls/msscript.ocx/tests/msscript.c b/dlls/msscript.ocx/tests/msscript.c index 46463c6..aa0c31e 100644 --- a/dlls/msscript.ocx/tests/msscript.c +++ b/dlls/msscript.ocx/tests/msscript.c @@ -3342,6 +3342,9 @@ static void test_IScriptControl_get_Error(void) hr = IScriptError_get_Description(error, &str); ok(hr == S_OK, "IScriptError_get_Description failed: 0x%08x.\n", hr); ok(str == NULL, "Error Description is not (null), got %s.\n", wine_dbgstr_w(str)); + hr = IScriptError_get_HelpFile(error, &str); + ok(hr == S_OK, "IScriptError_get_HelpFile failed: 0x%08x.\n", hr); + ok(str == NULL, "Error HelpFile is not (null), got %s.\n", wine_dbgstr_w(str));
str = SysAllocString(L"jscript"); hr = IScriptControl_put_Language(sc, str); @@ -3381,6 +3384,9 @@ static void test_IScriptControl_get_Error(void) hr = IScriptError_get_Description(error, &str); ok(hr == S_OK, "IScriptError_get_Description failed: 0x%08x.\n", hr); ok(str == NULL, "Error Description is not (null), got %s.\n", wine_dbgstr_w(str)); + hr = IScriptError_get_HelpFile(error, &str); + ok(hr == S_OK, "IScriptError_get_HelpFile failed: 0x%08x.\n", hr); + ok(str == NULL, "Error HelpFile is not (null), got %s.\n", wine_dbgstr_w(str));
hr = IScriptControl_get_Error(sc, &error2); ok(hr == S_OK, "IScriptControl_get_Error failed: 0x%08x.\n", hr); @@ -3437,6 +3443,9 @@ static void test_IScriptControl_get_Error(void) hr = IScriptError_get_Description(error, &str); ok(hr == S_OK, "IScriptError_get_Description failed: 0x%08x.\n", hr); ok(str == NULL, "Error Description is not (null), got %s.\n", wine_dbgstr_w(str)); + hr = IScriptError_get_HelpFile(error, &str); + ok(hr == S_OK, "IScriptError_get_HelpFile failed: 0x%08x.\n", hr); + ok(str == NULL, "Error HelpFile is not (null), got %s.\n", wine_dbgstr_w(str));
SET_EXPECT(GetSourceLineText); hr = IScriptError_get_Text(error, &str);