Maarten Lankhorst : oleaut32: Handle TKIND_ALIAS properly when passed as pointer.
Alexandre Julliard
julliard at winehq.org
Wed Mar 5 06:24:14 CST 2008
Module: wine
Branch: master
Commit: c978bbee87dd6e09e4ad836df5ad7d63506face2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c978bbee87dd6e09e4ad836df5ad7d63506face2
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Mon Mar 3 14:27:03 2008 -0800
oleaut32: Handle TKIND_ALIAS properly when passed as pointer.
---
dlls/oleaut32/tmarshal.c | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 2e5ae14..8a6e267 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -698,11 +698,24 @@ serialize_param(
}
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
switch (tattr->typekind) {
+ case TKIND_ALIAS:
+ if (tattr->tdescAlias.vt == VT_USERDEFINED)
+ {
+ DWORD href = tattr->tdescAlias.u.hreftype;
+ ITypeInfo_ReleaseTypeAttr(tinfo, tattr);
+ ITypeInfo_Release(tinfo2);
+ hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2);
+ if (hres) {
+ ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype);
+ return hres;
+ }
+ ITypeInfo_GetTypeAttr(tinfo2,&tattr);
+ derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE);
+ }
+ break;
case TKIND_ENUM: /* confirmed */
case TKIND_RECORD: /* FIXME: mostly untested */
- derefhere=TRUE;
break;
- case TKIND_ALIAS: /* FIXME: untested */
case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */
case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */
derefhere=FALSE;
@@ -1030,11 +1043,24 @@ deserialize_param(
}
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
switch (tattr->typekind) {
+ case TKIND_ALIAS:
+ if (tattr->tdescAlias.vt == VT_USERDEFINED)
+ {
+ DWORD href = tattr->tdescAlias.u.hreftype;
+ ITypeInfo_ReleaseTypeAttr(tinfo, tattr);
+ ITypeInfo_Release(tinfo2);
+ hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2);
+ if (hres) {
+ ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype);
+ return hres;
+ }
+ ITypeInfo_GetTypeAttr(tinfo2,&tattr);
+ derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE);
+ }
+ break;
case TKIND_ENUM: /* confirmed */
case TKIND_RECORD: /* FIXME: mostly untested */
- derefhere=TRUE;
break;
- case TKIND_ALIAS: /* FIXME: untested */
case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */
case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */
derefhere=FALSE;
More information about the wine-cvs
mailing list