Jacek Caban : atl: Moved AtlRegisterTypeLib to atl.c to avoid importing atl80.dll in atl.dll.

Alexandre Julliard julliard at winehq.org
Thu Feb 13 13:26:11 CST 2014


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Feb 13 16:00:42 2014 +0100

atl: Moved AtlRegisterTypeLib to atl.c to avoid importing atl80.dll in atl.dll.

---

 dlls/atl/Makefile.in |    2 +-
 dlls/atl100/atl.c    |   25 +++++++++++++++++++++++++
 dlls/atl80/atl80.c   |   21 ---------------------
 3 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/dlls/atl/Makefile.in b/dlls/atl/Makefile.in
index cf61896..396b9d6 100644
--- a/dlls/atl/Makefile.in
+++ b/dlls/atl/Makefile.in
@@ -1,6 +1,6 @@
 MODULE    = atl.dll
 IMPORTLIB = atl
-IMPORTS   = uuid atl80 oleaut32 ole32 user32 gdi32 advapi32
+IMPORTS   = uuid oleaut32 ole32 user32 gdi32 advapi32
 EXTRADEFS = -D_ATL_VER=_ATL_VER_30
 PARENTSRC = ../atl100
 
diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c
index afd8f77..53c7181 100644
--- a/dlls/atl100/atl.c
+++ b/dlls/atl100/atl.c
@@ -396,6 +396,31 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
     return S_OK;
 }
 
+#if _ATL_VER <= _ATL_VER_80
+
+/***********************************************************************
+ *           AtlRegisterTypeLib         [atl80.19]
+ */
+HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
+{
+    ITypeLib *typelib;
+    BSTR path;
+    HRESULT hres;
+
+    TRACE("(%p %s)\n", inst, debugstr_w(index));
+
+    hres = AtlLoadTypeLib(inst, index, &path, &typelib);
+    if(FAILED(hres))
+        return hres;
+
+    hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
+    ITypeLib_Release(typelib);
+    SysFreeString(path);
+    return hres;
+}
+
+#endif
+
 #if _ATL_VER > _ATL_VER_30
 
 /***********************************************************************
diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c
index b6aedda..ec1d4c8 100644
--- a/dlls/atl80/atl80.c
+++ b/dlls/atl80/atl80.c
@@ -68,24 +68,3 @@ HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib
 
     return S_OK;
 }
-
-/***********************************************************************
- *           AtlRegisterTypeLib         [atl80.19]
- */
-HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
-{
-    ITypeLib *typelib;
-    BSTR path;
-    HRESULT hres;
-
-    TRACE("(%p %s)\n", inst, debugstr_w(index));
-
-    hres = AtlLoadTypeLib(inst, index, &path, &typelib);
-    if(FAILED(hres))
-        return hres;
-
-    hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
-    ITypeLib_Release(typelib);
-    SysFreeString(path);
-    return hres;
-}




More information about the wine-cvs mailing list