From 75967cd9ffc20557d2166ace97d4b547b1ed7815 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 24 Feb 2010 21:57:26 +0100 Subject: [PATCH] atl: Don't add CLSID_ATLRegistrar replacement in do_register_dll_server. --- dlls/atl/registrar.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c index b2efda989ad..691b0056f55 100644 --- a/dlls/atl/registrar.c +++ b/dlls/atl/registrar.c @@ -758,14 +758,11 @@ static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll, LPCOLESTR wszId, BOOL do_register, const struct _ATL_REGMAP_ENTRY* pMapEntries) { - WCHAR buf[MAX_PATH]; HRESULT hres; const struct _ATL_REGMAP_ENTRY *pMapEntry; static const WCHAR wszModule[] = {'M','O','D','U','L','E',0}; static const WCHAR wszRegistry[] = {'R','E','G','I','S','T','R','Y',0}; - static const WCHAR wszCLSID_ATLRegistrar[] = - {'C','L','S','I','D','_','A','T','L','R','e','g','i','s','t','r','a','r',0}; if (!pRegistrar) Registrar_create(NULL, &IID_IRegistrar, (void**)&pRegistrar); @@ -775,9 +772,6 @@ static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll, for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey; pMapEntry++) IRegistrar_AddReplacement(pRegistrar, pMapEntry->szKey, pMapEntry->szData); - StringFromGUID2(&CLSID_ATLRegistrar, buf, sizeof(buf)/sizeof(buf[0])); - IRegistrar_AddReplacement(pRegistrar, wszCLSID_ATLRegistrar, buf); - if(do_register) hres = IRegistrar_ResourceRegisterSz(pRegistrar, wszDll, wszId, wszRegistry); else @@ -789,8 +783,15 @@ static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll, static HRESULT do_register_server(BOOL do_register) { - static const WCHAR wszDll[] = {'a','t','l','.','d','l','l',0}; - return do_register_dll_server(NULL, wszDll, MAKEINTRESOURCEW(101), do_register, NULL); + static const WCHAR CLSID_ATLRegistrarW[] = + {'C','L','S','I','D','_','A','T','L','R','e','g','i','s','t','r','a','r',0}; + static const WCHAR atl_dllW[] = {'a','t','l','.','d','l','l',0}; + + WCHAR clsid_str[40]; + const struct _ATL_REGMAP_ENTRY reg_map[] = {{CLSID_ATLRegistrarW, clsid_str}, {NULL,NULL}}; + + StringFromGUID2(&CLSID_ATLRegistrar, clsid_str, sizeof(clsid_str)/sizeof(WCHAR)); + return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register, reg_map); } /***********************************************************************