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
c9eed8f9
Commit
c9eed8f9
authored
Mar 13, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't use ITypeInfo for InvokeEx(DISPATCH_PROPERTYGET) implementation.
parent
dfaa1e95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
3 deletions
+60
-3
dispex.c
dlls/mshtml/dispex.c
+60
-3
No files found.
dlls/mshtml/dispex.c
View file @
c9eed8f9
...
...
@@ -759,6 +759,57 @@ static HRESULT get_builtin_id(DispatchEx *This, BSTR name, DWORD grfdex, DISPID
return
DISP_E_UNKNOWNNAME
;
}
/* List all types used by IDispatchEx-based properties */
#define BUILTIN_TYPES_SWITCH \
CASE_VT(VT_I2, INT16, V_I2); \
CASE_VT(VT_I4, INT32, V_I4); \
CASE_VT(VT_R4, float, V_R4); \
CASE_VT(VT_BSTR, BSTR, V_BSTR); \
CASE_VT(VT_BOOL, VARIANT_BOOL, V_BOOL); \
CASE_VT(VT_VARIANT, VARIANT, *); \
CASE_VT(VT_PTR, void*, V_BYREF); \
CASE_VT(VT_UNKNOWN, IUnknown*, V_UNKNOWN); \
CASE_VT(VT_DISPATCH, IDispatch*, V_DISPATCH)
static
HRESULT
builtin_propget
(
DispatchEx
*
This
,
func_info_t
*
func
,
DISPPARAMS
*
dp
,
VARIANT
*
res
)
{
IUnknown
*
iface
;
HRESULT
hres
;
if
(
dp
->
cArgs
)
{
FIXME
(
"cArgs %d
\n
"
,
dp
->
cArgs
);
return
E_NOTIMPL
;
}
assert
(
func
->
get_vtbl_off
);
hres
=
IUnknown_QueryInterface
(
This
->
outer
,
tid_ids
[
func
->
tid
],
(
void
**
)
&
iface
);
if
(
SUCCEEDED
(
hres
))
{
switch
(
func
->
prop_vt
)
{
#define CASE_VT(vt,type,access) \
case vt: { \
type val; \
hres = ((HRESULT (WINAPI*)(IUnknown*,type*))((void**)iface->lpVtbl)[func->get_vtbl_off])(iface,&val); \
if(SUCCEEDED(hres)) \
access(res) = val; \
} \
break
BUILTIN_TYPES_SWITCH
;
#undef CASE_VT
default:
FIXME
(
"Unhandled vt %d
\n
"
,
func
->
prop_vt
);
hres
=
E_NOTIMPL
;
}
IUnknown_Release
(
iface
);
}
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
res
)
=
func
->
prop_vt
==
VT_PTR
?
VT_DISPATCH
:
func
->
prop_vt
;
return
S_OK
;
}
static
HRESULT
invoke_builtin_prop
(
DispatchEx
*
This
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
...
...
@@ -776,10 +827,16 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD
if
(
FAILED
(
hres
))
return
hres
;
if
(
func
->
func_disp_idx
==
-
1
)
if
(
func
->
func_disp_idx
!=
-
1
)
return
function_invoke
(
This
,
func
,
flags
,
dp
,
res
,
ei
);
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
hres
=
builtin_propget
(
This
,
func
,
dp
,
res
);
break
;
default:
hres
=
typeinfo_invoke
(
This
,
func
,
flags
,
dp
,
res
,
ei
);
else
hres
=
function_invoke
(
This
,
func
,
flags
,
dp
,
res
,
ei
);
}
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