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
2f7afbeb
Commit
2f7afbeb
authored
Sep 19, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Properly handle TKIND_ALIAS when looking for iface GUID.
parent
5f8e4123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
18 deletions
+42
-18
typelib.c
dlls/oleaut32/typelib.c
+42
-18
No files found.
dlls/oleaut32/typelib.c
View file @
2f7afbeb
...
...
@@ -6022,6 +6022,42 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, const TYPEDESC *tdesc,
return
hr
;
}
static
HRESULT
get_iface_guid
(
ITypeInfo
*
tinfo
,
const
TYPEDESC
*
tdesc
,
GUID
*
guid
)
{
ITypeInfo
*
tinfo2
;
TYPEATTR
*
tattr
;
HRESULT
hres
;
hres
=
ITypeInfo_GetRefTypeInfo
(
tinfo
,
tdesc
->
u
.
hreftype
,
&
tinfo2
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
ITypeInfo_GetTypeAttr
(
tinfo2
,
&
tattr
);
if
(
FAILED
(
hres
))
{
ITypeInfo_Release
(
tinfo2
);
return
hres
;
}
switch
(
tattr
->
typekind
)
{
case
TKIND_ALIAS
:
hres
=
get_iface_guid
(
tinfo2
,
&
tattr
->
tdescAlias
,
guid
);
break
;
case
TKIND_INTERFACE
:
case
TKIND_DISPATCH
:
*
guid
=
tattr
->
guid
;
break
;
default:
ERR
(
"Unexpected typekind %d
\n
"
,
tattr
->
typekind
);
hres
=
E_UNEXPECTED
;
}
ITypeInfo_ReleaseTypeAttr
(
tinfo2
,
tattr
);
ITypeInfo_Release
(
tinfo2
);
return
hres
;
}
/***********************************************************************
* DispCallFunc (OLEAUT32.@)
*
...
...
@@ -6515,30 +6551,18 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
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
;
&&
(
V_VT
(
prgpvarg
[
i
])
==
VT_DISPATCH
||
V_VT
(
prgpvarg
[
i
])
==
VT_UNKNOWN
)
&&
V_UNKNOWN
(
prgpvarg
[
i
]))
{
IUnknown
*
userdefined_iface
;
ITypeInfo
*
tinfo2
;
TYPEATTR
*
tattr
;
if
(
tdesc
->
vt
==
VT_PTR
)
userdefined_tdesc
=
tdesc
->
u
.
lptdesc
;
GUID
guid
;
hres
=
ITypeInfo2_GetRefTypeInfo
(
iface
,
userdefined_tdesc
->
u
.
hreftype
,
&
tinfo2
);
hres
=
get_iface_guid
((
ITypeInfo
*
)
iface
,
tdesc
->
vt
==
VT_PTR
?
tdesc
->
u
.
lptdesc
:
tdesc
,
&
guid
);
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
);
hres
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
prgpvarg
[
i
]),
&
guid
,
(
void
**
)
&
userdefined_iface
);
if
(
FAILED
(
hres
))
{
ERR
(
"argument does not support %s interface
\n
"
,
debugstr_guid
(
&
tattr
->
guid
));
ERR
(
"argument does not support %s interface
\n
"
,
debugstr_guid
(
&
guid
));
break
;
}
...
...
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