Alistair Leslie-Hughes : oleaut32: Fail if we cannot find the TYPELIB resource.

Alexandre Julliard julliard at winehq.org
Fri Nov 30 13:48:21 CST 2012


Module: wine
Branch: master
Commit: 04d3ba5b35c133852fb368caa3da998868a332e0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=04d3ba5b35c133852fb368caa3da998868a332e0

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Nov 30 21:11:07 2012 +1100

oleaut32: Fail if we cannot find the TYPELIB resource.

---

 dlls/oleaut32/typelib.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 83ea7e1..fa9b050 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -2509,6 +2509,7 @@ static const IUnknownVtbl TLB_PEFile_Vtable =
 static HRESULT TLB_PEFile_Open(LPCWSTR path, INT index, LPVOID *ppBase, DWORD *pdwTLBLength, IUnknown **ppFile)
 {
     TLB_PEFile *This;
+    HRESULT hr = TYPE_E_CANTLOADLIBRARY;
 
     This = heap_alloc(sizeof(TLB_PEFile));
     if (!This)
@@ -2543,11 +2544,13 @@ static HRESULT TLB_PEFile_Open(LPCWSTR path, INT index, LPVOID *ppBase, DWORD *p
                     return S_OK;
                 }
             }
+
+            hr = E_FAIL;
         }
     }
 
     TLB_PEFile_Release((IUnknown *)&This->lpvtbl);
-    return TYPE_E_CANTLOADLIBRARY;
+    return hr;
 }
 
 typedef struct TLB_NEFile
@@ -2946,6 +2949,8 @@ 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;




More information about the wine-cvs mailing list