Alexandre Julliard : shell32: Don' t hardcode the system32 directory in registered classes.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 20 12:24:42 CST 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Dec 20 17:05:02 2006 +0100

shell32: Don't hardcode the system32 directory in registered classes.

---

 dlls/shell32/regsvr.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/shell32/regsvr.c b/dlls/shell32/regsvr.c
index 27cb5f3..f4cffd7 100644
--- a/dlls/shell32/regsvr.c
+++ b/dlls/shell32/regsvr.c
@@ -273,23 +273,23 @@ static HRESULT register_coclasses(struct
 	}
 
         if (list->idName) {
-            char buffer[64] = "@%SYSTEMROOT%\\system32\\shell32.dll,-";
-            sprintf(buffer+strlen(buffer), "%u", list->idName);
-            res = RegSetValueExA(clsid_key, localized_valuename, 0, REG_EXPAND_SZ,
+            char buffer[64];
+            sprintf(buffer, "@shell32.dll,-%u", list->idName);
+            res = RegSetValueExA(clsid_key, localized_valuename, 0, REG_SZ,
                                  (CONST BYTE*)(buffer), strlen(buffer)+1);
             if (res != ERROR_SUCCESS) goto error_close_clsid_key;
         }
         
         if (list->idDefaultIcon) {
             HKEY icon_key;
-            char buffer[64] = "%SYSTEMROOT%\\system32\\shell32.dll,-";
+            char buffer[64];
 
             res = RegCreateKeyExW(clsid_key, defaulticon_keyname, 0, NULL, 0,
                         KEY_READ | KEY_WRITE, NULL, &icon_key, NULL);
             if (res != ERROR_SUCCESS) goto error_close_clsid_key;
 
-            sprintf(buffer+strlen(buffer), "%u", list->idDefaultIcon);
-            res = RegSetValueExA(icon_key, NULL, 0, REG_EXPAND_SZ,
+            sprintf(buffer, "shell32.dll,-%u", list->idDefaultIcon);
+            res = RegSetValueExA(icon_key, NULL, 0, REG_SZ,
                                  (CONST BYTE*)(buffer), strlen(buffer)+1);
             RegCloseKey(icon_key);
             if (res != ERROR_SUCCESS) goto error_close_clsid_key;




More information about the wine-cvs mailing list