[PATCH 2/2] oleaut32: Also search local typeinfos in ITypeInfo::GetRefTypeInfo

Andrew Eikum aeikum at codeweavers.com
Thu May 16 09:30:38 CDT 2013


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

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 6a2a594..9ffcaaa 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -7089,6 +7089,19 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
         result = ITypeInfoImpl_GetDispatchRefTypeInfo((ITypeInfo *)iface, &href_dispatch, ppTInfo);
     } else {
         TLBRefType *ref_type;
+        UINT i;
+
+        for(i = 0; i < This->pTypeLib->TypeInfoCount; ++i)
+        {
+            if (This->pTypeLib->typeinfos[i]->hreftype == hRefType)
+            {
+                result = S_OK;
+                *ppTInfo = (ITypeInfo*)This->pTypeLib->typeinfos[i];
+                ITypeInfo_AddRef(*ppTInfo);
+                goto end;
+            }
+        }
+
         LIST_FOR_EACH_ENTRY(ref_type, &This->pTypeLib->ref_list, TLBRefType, entry)
         {
             if(ref_type->reference == hRefType)
-- 
1.8.2.3




More information about the wine-patches mailing list