Andrey Turkin : atl: Implement AtlModuleRegisterServer.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 13 09:24:33 CST 2006


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

Author: Andrey Turkin <pancha at mail.nnov.ru>
Date:   Sat Nov 11 00:08:11 2006 +0300

atl: Implement AtlModuleRegisterServer.

---

 dlls/atl/atl_main.c |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c
index 7195f13..c64ef46 100644
--- a/dlls/atl/atl_main.c
+++ b/dlls/atl/atl_main.c
@@ -257,7 +257,34 @@ HRESULT WINAPI AtlInternalQueryInterface
  */
 HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* clsid)
 {
-    FIXME("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
+    int i;
+    HRESULT hRes;
+
+    TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
+
+    if (pM == NULL)
+        return E_INVALIDARG;
+
+    for (i = 0; pM->m_pObjMap[i].pclsid != NULL; i++) /* register CLSIDs */
+    {
+        if (!clsid || IsEqualCLSID(pM->m_pObjMap[i].pclsid, clsid))
+        {
+            const _ATL_OBJMAP_ENTRYW *obj = &pM->m_pObjMap[i];
+
+            TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid));
+            hRes = obj->pfnUpdateRegistry(TRUE); /* register */
+            if (FAILED(hRes))
+                return hRes;
+        }
+    }
+
+    if (bRegTypeLib)
+    {
+        hRes = AtlModuleRegisterTypeLib(pM, NULL);
+        if (FAILED(hRes))
+            return hRes;
+    }
+
     return S_OK;
 }
 




More information about the wine-cvs mailing list