mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 10:44:47 +00:00
shell32: Don't hardcode the system32 directory in registered classes.
This commit is contained in:
parent
959113d270
commit
d56b3c10c4
1 changed files with 6 additions and 6 deletions
|
@ -273,23 +273,23 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue