Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
be253c1d
Commit
be253c1d
authored
Oct 17, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Don't use IDispatchEx for internal calls.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6d55197e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
run.c
dlls/vbscript/tests/run.c
+0
-2
vbdisp.c
dlls/vbscript/vbdisp.c
+14
-3
No files found.
dlls/vbscript/tests/run.c
View file @
be253c1d
...
...
@@ -1610,9 +1610,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
memset
(
&
ei
,
0
,
sizeof
(
ei
));
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
0
,
DISPATCH_METHOD
,
&
dp
,
&
v
,
&
ei
,
pspCaller
);
ok
(
hres
==
S_OK
,
"InvokeEx failed: %08x
\n
"
,
hres
);
todo_wine
CHECK_CALLED
(
OnEnterScript
);
todo_wine
CHECK_CALLED
(
OnLeaveScript
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_BOOL
(
&
v
)
==
VARIANT_TRUE
,
"V_BOOL(v) = %x
\n
"
,
V_BOOL
(
&
v
));
...
...
dlls/vbscript/vbdisp.c
View file @
be253c1d
...
...
@@ -266,7 +266,7 @@ static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern
return
DISP_E_MEMBERNOTFOUND
;
}
return
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
params
,
res
);
return
exec_script
(
This
->
desc
->
ctx
,
extern_caller
,
func
,
This
,
params
,
res
);
case
DISPATCH_METHOD
:
case
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
:
...
...
@@ -276,7 +276,8 @@ static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern
return
DISP_E_MEMBERNOTFOUND
;
}
return
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
params
,
res
);
return
exec_script
(
This
->
desc
->
ctx
,
extern_caller
,
func
,
This
,
params
,
res
);
case
DISPATCH_PROPERTYPUT
:
case
DISPATCH_PROPERTYPUTREF
:
case
DISPATCH_PROPERTYPUT
|
DISPATCH_PROPERTYPUTREF
:
{
...
...
@@ -301,7 +302,7 @@ static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern
return
DISP_E_MEMBERNOTFOUND
;
}
hres
=
exec_script
(
This
->
desc
->
ctx
,
FALSE
,
func
,
This
,
&
dp
,
NULL
);
hres
=
exec_script
(
This
->
desc
->
ctx
,
extern_caller
,
func
,
This
,
&
dp
,
NULL
);
if
(
needs_release
)
VariantClear
(
&
put_val
);
return
hres
;
...
...
@@ -1078,6 +1079,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
{
const
WORD
flags
=
DISPATCH_METHOD
|
(
retv
?
DISPATCH_PROPERTYGET
:
0
);
IDispatchEx
*
dispex
;
vbdisp_t
*
vbdisp
;
EXCEPINFO
ei
;
HRESULT
hres
;
...
...
@@ -1085,6 +1087,10 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
if
(
retv
)
V_VT
(
retv
)
=
VT_EMPTY
;
vbdisp
=
unsafe_impl_from_IDispatch
(
disp
);
if
(
vbdisp
&&
vbdisp
->
desc
&&
vbdisp
->
desc
->
ctx
==
ctx
)
return
invoke_vbdisp
(
vbdisp
,
id
,
flags
,
FALSE
,
dp
,
retv
);
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
FAILED
(
hres
))
{
UINT
err
=
0
;
...
...
@@ -1107,9 +1113,14 @@ HRESULT get_disp_value(script_ctx_t *ctx, IDispatch *disp, VARIANT *v)
HRESULT
disp_propput
(
script_ctx_t
*
ctx
,
IDispatch
*
disp
,
DISPID
id
,
WORD
flags
,
DISPPARAMS
*
dp
)
{
IDispatchEx
*
dispex
;
vbdisp_t
*
vbdisp
;
EXCEPINFO
ei
=
{
0
};
HRESULT
hres
;
vbdisp
=
unsafe_impl_from_IDispatch
(
disp
);
if
(
vbdisp
&&
vbdisp
->
desc
&&
vbdisp
->
desc
->
ctx
==
ctx
)
return
invoke_vbdisp
(
vbdisp
,
id
,
flags
,
FALSE
,
dp
,
NULL
);
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
ctx
->
lcid
,
flags
,
dp
,
NULL
,
&
ei
,
NULL
/* FIXME! */
);
...
...
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