Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/msscript.ocx/msscript.c | 9 +++++++-- dlls/msscript.ocx/tests/msscript.c | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index dcea967..05e6121 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -128,6 +128,7 @@ typedef struct { BSTR source; BSTR desc; BSTR help_file; + DWORD help_context;
BOOLEAN info_filled; } ScriptError; @@ -2136,6 +2137,7 @@ static void fill_error_info(ScriptError *error) error->source = info.bstrSource; error->desc = info.bstrDescription; error->help_file = info.bstrHelpFile; + error->help_context = info.dwHelpContext; }
static HRESULT WINAPI ScriptError_QueryInterface(IScriptError *iface, REFIID riid, void **ppv) @@ -2293,9 +2295,11 @@ static HRESULT WINAPI ScriptError_get_HelpContext(IScriptError *iface, LONG *plH { ScriptError *This = impl_from_IScriptError(iface);
- FIXME("(%p)->(%p)\n", This, plHelpContext); + TRACE("(%p)->(%p)\n", This, plHelpContext);
- return E_NOTIMPL; + fill_error_info(This); + *plHelpContext = This->help_context; + return S_OK; }
static HRESULT WINAPI ScriptError_get_Text(IScriptError *iface, BSTR *pbstrText) @@ -2344,6 +2348,7 @@ static HRESULT WINAPI ScriptError_Clear(IScriptError *iface) This->source = NULL; This->desc = NULL; This->help_file = NULL; + This->help_context = 0;
This->info_filled = FALSE; return S_OK; diff --git a/dlls/msscript.ocx/tests/msscript.c b/dlls/msscript.ocx/tests/msscript.c index aa0c31e..702fbb1 100644 --- a/dlls/msscript.ocx/tests/msscript.c +++ b/dlls/msscript.ocx/tests/msscript.c @@ -3345,6 +3345,9 @@ static void test_IScriptControl_get_Error(void) 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 = IScriptError_get_HelpContext(error, &x); + ok(hr == S_OK, "IScriptError_get_HelpContext failed: 0x%08x.\n", hr); + ok(x == 0, "Error HelpContext is not 0, got %d.\n", x);
str = SysAllocString(L"jscript"); hr = IScriptControl_put_Language(sc, str); @@ -3387,6 +3390,9 @@ static void test_IScriptControl_get_Error(void) 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 = IScriptError_get_HelpContext(error, &x); + ok(hr == S_OK, "IScriptError_get_HelpContext failed: 0x%08x.\n", hr); + ok(x == 0, "Error HelpContext is not 0, got %d.\n", x);
hr = IScriptControl_get_Error(sc, &error2); ok(hr == S_OK, "IScriptControl_get_Error failed: 0x%08x.\n", hr); @@ -3446,6 +3452,9 @@ static void test_IScriptControl_get_Error(void) 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 = IScriptError_get_HelpContext(error, &x); + ok(hr == S_OK, "IScriptError_get_HelpContext failed: 0x%08x.\n", hr); + ok(x == 0, "Error HelpContext is not 0, got %d.\n", x);
SET_EXPECT(GetSourceLineText); hr = IScriptError_get_Text(error, &str);