Dmitry Timoshkov : devenum: Do not store full DLL path in the registry.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Jan 6 05:12:55 CST 2007


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Sat Jan  6 16:51:01 2007 +0800

devenum: Do not store full DLL path in the registry.

---

 dlls/devenum/devenum_main.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/dlls/devenum/devenum_main.c b/dlls/devenum/devenum_main.c
index 3d8566d..bb4bbbe 100644
--- a/dlls/devenum/devenum_main.c
+++ b/dlls/devenum/devenum_main.c
@@ -296,7 +296,6 @@ HRESULT WINAPI DllUnregisterServer(void)
 static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWSTR pszThreadingModel)
 {
     HRESULT res = S_OK;
-    WCHAR dll_module[MAX_PATH];
     LPOLESTR clsidString;
     HKEY hkeyClsid;
     HKEY hkeySub;
@@ -305,18 +304,11 @@ static HRESULT register_clsids(int count
     int i;
     static const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
     static const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
+    static const WCHAR dll_module[] = {'d','e','v','e','n','u','m','.','d','l','l',0};
 
     res = RegOpenKeyW(HKEY_CLASSES_ROOT, clsid_keyname, &hkeyClsid)
           == ERROR_SUCCESS ? S_OK : E_FAIL;
 
-    TRACE("HModule = %p\n", DEVENUM_hInstance);
-    i = GetModuleFileNameW(DEVENUM_hInstance, dll_module,
-                           sizeof(dll_module) / sizeof(WCHAR));
-    if (!i)
-	return HRESULT_FROM_WIN32(GetLastError());
-    if (i >= sizeof(dll_module) / sizeof(WCHAR))
-	return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
-
     for (i = 0; i < count; i++)
     {
         if (SUCCEEDED(res))




More information about the wine-cvs mailing list