James Hawkins : msi: Directly register the typelib if it' s not embedded in a PE module.

Alexandre Julliard julliard at winehq.org
Tue Jul 29 07:16:35 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Jul 28 22:19:47 2008 -0500

msi: Directly register the typelib if it's not embedded in a PE module.

---

 dlls/msi/action.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 68dd6f3..6662945 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2994,7 +2994,10 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
     MSICOMPONENT *comp;
     MSIFILE *file;
     typelib_struct tl_struct;
+    ITypeLib *tlib;
     HMODULE module;
+    HRESULT hr;
+
     static const WCHAR szTYPELIB[] = {'T','Y','P','E','L','I','B',0};
 
     component = MSI_RecordGetString(row,3);
@@ -3063,7 +3066,16 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
         msi_free(tl_struct.source);
     }
     else
-        ERR("Could not load file! %s\n", debugstr_w(file->TargetPath));
+    {
+        hr = LoadTypeLibEx(file->TargetPath, REGKIND_REGISTER, &tlib);
+        if (FAILED(hr))
+        {
+            ERR("Failed to load type library: %08x\n", hr);
+            return ERROR_FUNCTION_FAILED;
+        }
+
+        ITypeLib_Release(tlib);
+    }
 
     return ERROR_SUCCESS;
 }




More information about the wine-cvs mailing list