Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fa0c84ae
Commit
fa0c84ae
authored
Oct 31, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Support DISP_E_EXCEPTION Invoke[Ex] return value.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9115c37b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
5 deletions
+41
-5
error.vbs
dlls/vbscript/tests/error.vbs
+16
-0
run.c
dlls/vbscript/tests/run.c
+10
-1
vbdisp.c
dlls/vbscript/vbdisp.c
+15
-4
No files found.
dlls/vbscript/tests/error.vbs
View file @
fa0c84ae
...
...
@@ -457,4 +457,20 @@ end sub
call
testVBErrorCodes
on
error
resume
next
throwWithDesc
ok
err
.
number
=
&
hdeadbeef&
,
"err.number = "
&
hex
(
err
.
number
)
ok
err
.
description
=
"test"
,
"err.description = "
&
err
.
description
ok
err
.
helpcontext
=
10
,
"err.helpcontext = "
&
err
.
helpcontext
ok
err
.
helpfile
=
"test.chm"
,
"err.helpfile = "
&
err
.
helpfile
throwWithDesc
=
1
ok
err
.
number
=
&
hdeadbeef&
,
"err.number = "
&
hex
(
err
.
number
)
ok
err
.
description
=
"test"
,
"err.description = "
&
err
.
description
ok
err
.
helpcontext
=
10
,
"err.helpcontext = "
&
err
.
helpcontext
ok
err
.
helpfile
=
"test.chm"
,
"err.helpfile = "
&
err
.
helpfile
on
error
goto
0
call
reportSuccess
()
dlls/vbscript/tests/run.c
View file @
fa0c84ae
...
...
@@ -139,6 +139,7 @@ DEFINE_EXPECT(OnLeaveScript);
#define DISPID_GLOBAL_WEEKSTARTDAY 1021
#define DISPID_GLOBAL_GLOBALCALLBACK 1022
#define DISPID_GLOBAL_TESTERROROBJECT 1023
#define DISPID_GLOBAL_THROWWITHDESC 1024
#define DISPID_TESTOBJ_PROPGET 2000
#define DISPID_TESTOBJ_PROPPUT 2001
...
...
@@ -1105,7 +1106,8 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
{
L"testArray"
,
DISPID_GLOBAL_TESTARRAY
},
{
L"throwInt"
,
DISPID_GLOBAL_THROWINT
},
{
L"testOptionalArg"
,
DISPID_GLOBAL_TESTOPTIONALARG
},
{
L"testErrorObject"
,
DISPID_GLOBAL_TESTERROROBJECT
}
{
L"testErrorObject"
,
DISPID_GLOBAL_TESTERROROBJECT
},
{
L"throwWithDesc"
,
DISPID_GLOBAL_THROWWITHDESC
}
};
test_grfdex
(
grfdex
,
fdexNameCaseInsensitive
);
...
...
@@ -1463,6 +1465,13 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
}
return
hres
;
case
DISPID_GLOBAL_THROWWITHDESC
:
pei
->
scode
=
0xdeadbeef
;
pei
->
bstrDescription
=
SysAllocString
(
L"test"
);
pei
->
bstrHelpFile
=
SysAllocString
(
L"test.chm"
);
pei
->
dwHelpContext
=
10
;
return
DISP_E_EXCEPTION
;
}
case
DISPID_GLOBAL_TESTOPTIONALARG
:
{
...
...
dlls/vbscript/vbdisp.c
View file @
fa0c84ae
...
...
@@ -952,15 +952,21 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
return
invoke_vbdisp
(
vbdisp
,
id
,
flags
,
FALSE
,
dp
,
retv
);
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
FAILED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
ctx
->
lcid
,
flags
,
dp
,
retv
,
&
ei
,
NULL
/* CALLER_FIXME */
);
IDispatchEx_Release
(
dispex
);
}
else
{
UINT
err
=
0
;
TRACE
(
"using IDispatch
\n
"
);
return
IDispatch_Invoke
(
disp
,
id
,
&
IID_NULL
,
ctx
->
lcid
,
flags
,
dp
,
retv
,
&
ei
,
&
err
);
hres
=
IDispatch_Invoke
(
disp
,
id
,
&
IID_NULL
,
ctx
->
lcid
,
flags
,
dp
,
retv
,
&
ei
,
&
err
);
}
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
ctx
->
lcid
,
flags
,
dp
,
retv
,
&
ei
,
NULL
/* CALLER_FIXME */
);
IDispatchEx_Release
(
dispex
);
if
(
hres
==
DISP_E_EXCEPTION
)
{
clear_ei
(
&
ctx
->
ei
);
ctx
->
ei
=
ei
;
hres
=
SCRIPT_E_RECORDED
;
}
return
hres
;
}
...
...
@@ -994,5 +1000,10 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags,
hres
=
IDispatch_Invoke
(
disp
,
id
,
&
IID_NULL
,
ctx
->
lcid
,
flags
,
dp
,
NULL
,
&
ei
,
&
err
);
}
if
(
hres
==
DISP_E_EXCEPTION
)
{
clear_ei
(
&
ctx
->
ei
);
ctx
->
ei
=
ei
;
hres
=
SCRIPT_E_RECORDED
;
}
return
hres
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment