[PATCH 4/6] oleaut32: TKIND_ALIAS improvements

Andrew Eikum aeikum at codeweavers.com
Fri Aug 16 14:40:26 CDT 2013


---
 dlls/oleaut32/typelib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 118e1f0..3019f1f 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -2536,17 +2536,17 @@ static ITypeInfoImpl * MSFT_DoTypeInfo(
     ptiRet->guid = MSFT_ReadGuid(tiBase.posguid, pcx);
     ptiRet->lcid=pLibInfo->set_lcid;   /* FIXME: correct? */
     ptiRet->lpstrSchema=NULL;              /* reserved */
+    ptiRet->typekind=tiBase.typekind & 0xF;
     ptiRet->cbSizeInstance=tiBase.size;
 #ifdef _WIN64
-    if(pLibInfo->syskind == SYS_WIN32)
+    if(pLibInfo->syskind == SYS_WIN32 && ptiRet->typekind != TKIND_ALIAS)
         ptiRet->cbSizeInstance=sizeof(void*);
 #endif
-    ptiRet->typekind=tiBase.typekind & 0xF;
     ptiRet->cFuncs=LOWORD(tiBase.cElement);
     ptiRet->cVars=HIWORD(tiBase.cElement);
     ptiRet->cbAlignment=(tiBase.typekind >> 11 )& 0x1F; /* there are more flags there */
 #ifdef _WIN64
-    if(pLibInfo->syskind == SYS_WIN32)
+    if(pLibInfo->syskind == SYS_WIN32 && ptiRet->typekind != TKIND_ALIAS)
         ptiRet->cbAlignment = 8;
 #endif
     ptiRet->wTypeFlags=tiBase.flags;
@@ -8502,7 +8502,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnCreateTypeInfo(ICreateTypeLib2 *iface,
         info->cbSizeInstance = 2;
         break;
     case TKIND_ALIAS:
-        info->cbSizeInstance = -0x75;
+        info->cbSizeInstance = 4;
         break;
     default:
         FIXME("unrecognized typekind %d\n", info->typekind);
-- 
1.8.3.4





More information about the wine-patches mailing list