oleaut32: Dont output an error when the typelib cannot be found ( try 2)

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Dec 20 02:52:19 CST 2012


Hi,

Changelog:
      oleaut32: Don't output an error when the typelib cannot be found


Best Regards
   Alistair Leslie-Hughes

-------------- next part --------------
>From 9aa60f83c2bf5dde082019124d9f55f017436ecd Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Fri, 14 Dec 2012 14:05:09 +1100
Subject: [PATCH] Dont output an error when typelib cannot be found
To: wine-patches <wine-patches at winehq.org>

---
 dlls/oleaut32/typelib.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index fa9b050..722b0c4 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -2544,9 +2544,10 @@ static HRESULT TLB_PEFile_Open(LPCWSTR path, INT index, LPVOID *ppBase, DWORD *p
                     return S_OK;
                 }
             }
-
-            hr = E_FAIL;
         }
+
+        TRACE("No TYPELIB resource found\n");
+        hr = E_FAIL;
     }
 
     TLB_PEFile_Release((IUnknown *)&This->lpvtbl);
@@ -2949,8 +2950,6 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
             ret = TYPE_E_CANTLOADLIBRARY;
         IUnknown_Release(pFile);
     }
-    else
-        ret = TYPE_E_CANTLOADLIBRARY;
 
     if(*ppTypeLib) {
 	ITypeLibImpl *impl = (ITypeLibImpl*)*ppTypeLib;
@@ -2966,8 +2965,15 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
         list_add_head(&tlb_cache, &impl->entry);
         LeaveCriticalSection(&cache_section);
         ret = S_OK;
-    } else
-	ERR("Loading of typelib %s failed with error %d\n", debugstr_w(pszFileName), GetLastError());
+    }
+    else
+    {
+        if(ret != E_FAIL)
+            ERR("Loading of typelib %s failed with error %d\n", debugstr_w(pszFileName), GetLastError());
+
+        ret = TYPE_E_CANTLOADLIBRARY;
+    }
+
 
     return ret;
 }
-- 
1.7.10.4



More information about the wine-patches mailing list