<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Alistair<small>,<br>
<br>
</small>On 10/26/15 09:56, Alistair Leslie-Hughes wrote:<br>
</div>
<blockquote
cite="mid:BLU437-SMTP5473227EE9B99605B4AC8693230@phx.gbl"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap="">Signed-off-by: Alistair Leslie-Hughes <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:leslie_alistair@hotmail.com"><leslie_alistair@hotmail.com></a>
---
dlls/vbscript/tests/run.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index a86711a..e625136 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -100,6 +100,7 @@ DEFINE_EXPECT(Next);
DEFINE_EXPECT(GetWindow);
DEFINE_EXPECT(GetUIBehavior);
DEFINE_EXPECT(EnableModeless);
+DEFINE_EXPECT(on_script_error);</pre>
</div>
</blockquote>
<br>
Please use OnScriptError for consistency.<br>
<br>
<blockquote
cite="mid:BLU437-SMTP5473227EE9B99605B4AC8693230@phx.gbl"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap=""> #define DISPID_GLOBAL_REPORTSUCCESS 1000
#define DISPID_GLOBAL_TRACE 1001
@@ -138,6 +139,7 @@ static const char *test_name = "(null)";
static int test_counter;
static SCRIPTUICHANDLING uic_handling = SCRIPTUICHANDLING_NOUIERROR;
static IDispatchEx testObj;
+static BOOL overwrite_return = FALSE;</pre>
</div>
</blockquote>
<br>
How about using HRESULT here...<br>
<br>
<blockquote
cite="mid:BLU437-SMTP5473227EE9B99605B4AC8693230@phx.gbl"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap=""> static BSTR a2bstr(const char *str)
{
@@ -1623,7 +1625,22 @@ static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, S
static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
{
- return E_NOTIMPL;
+ HRESULT hr;
+ EXCEPINFO ei = {0};
+
+ CHECK_EXPECT(on_script_error);
+
+ hr = IActiveScriptError_GetExceptionInfo(pscripterror, &ei);
+ ok(hr == S_OK, "GetExceptionInfo %x\n", hr);
+
+ if(overwrite_return)
+ {
+ overwrite_return = FALSE;
+ return S_OK;
+ }
+
+ /* We return the EXCEPINFO error since returning S_OK means we have handled the error */
+ return ei.scode;</pre>
</div>
</blockquote>
<br>
... and return it here for simplicity?<br>
<br>
Thanks,<br>
Jacek<br>
</body>
</html>