https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9c21d0c12438b9dc34621…
commit 9c21d0c12438b9dc3462100dae37e88c0f522c60
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Sun Oct 30 15:04:41 2022 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Oct 30 15:04:41 2022 +0300
[DESK] Do not load system-defined class name
In fact Windows XP/2003 desk.cpl uses only user-defined values,
and performs fallback to shell32.dll strings in case they are missing.
CORE-18565 CORE-8427
---
dll/cpl/desk/desktop.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/dll/cpl/desk/desktop.c b/dll/cpl/desk/desktop.c
index 351eea1ee85..ed16eba7eeb 100644
--- a/dll/cpl/desk/desktop.c
+++ b/dll/cpl/desk/desktop.c
@@ -285,20 +285,11 @@ DesktopOnInitDialog(IN HWND hwndDlg, IN PDESKTOP_DATA pData)
if (SHGetValue(HKEY_CURRENT_USER, szClassPath, IconChange[i].IconName,
&dwType,
pData->LocalIcon[i].szTitle, &cbData) != ERROR_SUCCESS ||
dwType != REG_SZ)
{
- /* Try loading system-defined class icon title */
- StringCchCopy(szClassPath, _countof(szClassPath), szSysClass);
- StringCchCat(szClassPath, _countof(szClassPath), IconChange[i].CLSID);
- cbData = sizeof(pData->LocalIcon[i].szTitle);
-
- if (SHGetValue(HKEY_CLASSES_ROOT, szClassPath, IconChange[i].IconName,
&dwType,
- pData->LocalIcon[i].szTitle, &cbData) != ERROR_SUCCESS
|| dwType != REG_SZ)
- {
- /* Fallback to predefined strings */
- LoadString(GetModuleHandle(TEXT("shell32.dll")),
- IconChange[i].TitleId,
- pData->LocalIcon[i].szTitle,
- _countof(pData->LocalIcon[i].szTitle));
- }
+ /* Fallback to predefined strings */
+ LoadString(GetModuleHandle(TEXT("shell32.dll")),
+ IconChange[i].TitleId,
+ pData->LocalIcon[i].szTitle,
+ _countof(pData->LocalIcon[i].szTitle));
}
hIcon = GetIconFromLocation(pData->LocalIcon[i].szPath);