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
44936abd
Commit
44936abd
authored
Aug 20, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Ensure that the right interface is passed to the callee in ITypeInfo::Invoke.
parent
c74d9a43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+0
-1
typelib.c
dlls/oleaut32/typelib.c
+33
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
44936abd
...
...
@@ -782,7 +782,6 @@ static HRESULT WINAPI StaticWidget_Invoke(IStaticWidget *iface, DISPID dispIdMem
static
HRESULT
WINAPI
StaticWidget_TestDual
(
IStaticWidget
*
iface
,
ItestDual
*
p
)
{
trace
(
"TestDual()
\n
"
);
todo_wine
ok
(
p
==
&
TestDual
,
"wrong ItestDual
\n
"
);
return
S_OK
;
}
...
...
dlls/oleaut32/typelib.c
View file @
44936abd
...
...
@@ -6357,6 +6357,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
USHORT
wParamFlags
=
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wParamFlags
;
TYPEDESC
*
tdesc
=
&
func_desc
->
lprgelemdescParam
[
i
].
tdesc
;
VARIANTARG
*
src_arg
;
if
(
wParamFlags
&
PARAMFLAG_FLCID
)
...
...
@@ -6509,6 +6510,38 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
{
prgpvarg
[
i
]
=
src_arg
;
}
if
((
tdesc
->
vt
==
VT_USERDEFINED
||
(
tdesc
->
vt
==
VT_PTR
&&
tdesc
->
u
.
lptdesc
->
vt
==
VT_USERDEFINED
))
&&
(
V_VT
(
prgpvarg
[
i
])
==
VT_DISPATCH
||
V_VT
(
prgpvarg
[
i
])
==
VT_UNKNOWN
))
{
const
TYPEDESC
*
userdefined_tdesc
=
tdesc
;
IUnknown
*
userdefined_iface
;
ITypeInfo
*
tinfo2
;
TYPEATTR
*
tattr
;
if
(
tdesc
->
vt
==
VT_PTR
)
userdefined_tdesc
=
tdesc
->
u
.
lptdesc
;
hres
=
ITypeInfo2_GetRefTypeInfo
(
iface
,
userdefined_tdesc
->
u
.
hreftype
,
&
tinfo2
);
if
(
FAILED
(
hres
))
break
;
hres
=
ITypeInfo_GetTypeAttr
(
tinfo2
,
&
tattr
);
if
(
FAILED
(
hres
))
{
ITypeInfo_Release
(
tinfo2
);
return
hres
;
}
hres
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
prgpvarg
[
i
]),
&
tattr
->
guid
,
(
void
**
)
&
userdefined_iface
);
ITypeInfo_ReleaseTypeAttr
(
tinfo2
,
tattr
);
ITypeInfo_Release
(
tinfo2
);
if
(
FAILED
(
hres
))
{
ERR
(
"argument does not support %s interface
\n
"
,
debugstr_guid
(
&
tattr
->
guid
));
break
;
}
IUnknown_Release
(
V_UNKNOWN
(
prgpvarg
[
i
]));
V_UNKNOWN
(
prgpvarg
[
i
])
=
userdefined_iface
;
}
}
else
if
(
wParamFlags
&
PARAMFLAG_FOPT
)
{
...
...
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