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
4ae7d364
Commit
4ae7d364
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: Use caller for argument convertion in builtin_propput if available.
parent
ba1d4d71
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
dispex.c
dlls/mshtml/dispex.c
+22
-4
No files found.
dlls/mshtml/dispex.c
View file @
4ae7d364
...
...
@@ -771,6 +771,25 @@ static HRESULT get_builtin_id(DispatchEx *This, BSTR name, DWORD grfdex, DISPID
CASE_VT(VT_UNKNOWN, IUnknown*, V_UNKNOWN); \
CASE_VT(VT_DISPATCH, IDispatch*, V_DISPATCH)
static
HRESULT
change_type
(
VARIANT
*
dst
,
VARIANT
*
src
,
VARTYPE
vt
,
IServiceProvider
*
caller
)
{
V_VT
(
dst
)
=
VT_EMPTY
;
if
(
caller
)
{
IVariantChangeType
*
change_type
=
NULL
;
HRESULT
hres
;
hres
=
IServiceProvider_QueryService
(
caller
,
&
SID_VariantConversion
,
&
IID_IVariantChangeType
,
(
void
**
)
&
change_type
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IVariantChangeType_ChangeType
(
change_type
,
dst
,
src
,
LOCALE_NEUTRAL
,
vt
);
IVariantChangeType_Release
(
change_type
);
return
hres
;
}
}
return
VariantChangeType
(
dst
,
src
,
0
,
vt
);
}
static
HRESULT
builtin_propget
(
DispatchEx
*
This
,
func_info_t
*
func
,
DISPPARAMS
*
dp
,
VARIANT
*
res
)
{
IUnknown
*
iface
;
...
...
@@ -810,7 +829,7 @@ static HRESULT builtin_propget(DispatchEx *This, func_info_t *func, DISPPARAMS *
return
S_OK
;
}
static
HRESULT
builtin_propput
(
DispatchEx
*
This
,
func_info_t
*
func
,
DISPPARAMS
*
dp
)
static
HRESULT
builtin_propput
(
DispatchEx
*
This
,
func_info_t
*
func
,
DISPPARAMS
*
dp
,
IServiceProvider
*
caller
)
{
VARIANT
*
v
,
tmpv
;
IUnknown
*
iface
;
...
...
@@ -829,8 +848,7 @@ static HRESULT builtin_propput(DispatchEx *This, func_info_t *func, DISPPARAMS *
v
=
dp
->
rgvarg
;
if
(
func
->
prop_vt
!=
VT_VARIANT
&&
V_VT
(
v
)
!=
func
->
prop_vt
)
{
V_VT
(
&
tmpv
)
=
VT_EMPTY
;
VariantChangeType
(
&
tmpv
,
v
,
0
,
func
->
prop_vt
);
hres
=
change_type
(
&
tmpv
,
v
,
func
->
prop_vt
,
caller
);
if
(
FAILED
(
hres
))
return
hres
;
v
=
&
tmpv
;
...
...
@@ -882,7 +900,7 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD
case
DISPATCH_PROPERTYPUT
:
if
(
res
)
V_VT
(
res
)
=
VT_EMPTY
;
hres
=
builtin_propput
(
This
,
func
,
dp
);
hres
=
builtin_propput
(
This
,
func
,
dp
,
caller
);
break
;
case
DISPATCH_PROPERTYGET
:
hres
=
builtin_propget
(
This
,
func
,
dp
,
res
);
...
...
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