Module: wine Branch: master Commit: 131d9964b7a5be574177ca9393d00240575840a1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=131d9964b7a5be574177ca9393...
Author: Andrey Turkin pancha@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; }