Author: gadamopoulos
Date: Wed Dec 7 00:10:43 2016
New Revision: 73436
URL:
http://svn.reactos.org/svn/reactos?rev=73436&view=rev
Log:
[SHELL32] - Initialize the shell icon cache only when needed or when FileIconInit is
called (and not in the DllMain of shell32)
Modified:
trunk/reactos/dll/win32/shell32/iconcache.cpp
trunk/reactos/dll/win32/shell32/shell32.cpp
trunk/reactos/dll/win32/shell32/wine/shellord.c
Modified: trunk/reactos/dll/win32/shell32/iconcache.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/iconcach…
==============================================================================
--- trunk/reactos/dll/win32/shell32/iconcache.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/iconcache.cpp [iso-8859-1] Wed Dec 7 00:10:43 2016
@@ -453,6 +453,9 @@
sice.dwSourceIndex = dwSourceIndex;
sice.dwFlags = dwFlags;
+ if (!sic_hdpa)
+ SIC_Initialize();
+
EnterCriticalSection(&SHELL32_SicCS);
if (NULL != DPA_GetPtr (sic_hdpa, 0))
@@ -687,6 +690,9 @@
RegCloseKey(hKeyShellIcons);
}
+ if (!sic_hdpa)
+ SIC_Initialize();
+
return SIC_LoadIcon(iconPath, iconIdx, 0);
}
@@ -698,13 +704,17 @@
*
*/
BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList)
-{ TRACE("(%p,%p)\n",lpBigList,lpSmallList);
+{
+ TRACE("(%p,%p)\n",lpBigList,lpSmallList);
+
+ if (!sic_hdpa)
+ SIC_Initialize();
+
if (lpBigList)
- { *lpBigList = ShellBigIconList;
- }
+ *lpBigList = ShellBigIconList;
+
if (lpSmallList)
- { *lpSmallList = ShellSmallIconList;
- }
+ *lpSmallList = ShellSmallIconList;
return TRUE;
}
@@ -734,6 +744,9 @@
int iShortcutDefaultIndex = INVALID_INDEX;
TRACE("sf=%p pidl=%p %s\n", sh, pidl,
bBigIcon?"Big":"Small");
+
+ if (!sic_hdpa)
+ SIC_Initialize();
if (SUCCEEDED (sh->GetUIObjectOf(0, 1, &pidl, IID_NULL_PPV_ARG(IExtractIconW,
&ei))))
{
Modified: trunk/reactos/dll/win32/shell32/shell32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Wed Dec 7 00:10:43 2016
@@ -308,7 +308,6 @@
InitCommonControlsEx(&InitCtrls);
/* Bad idea, initialization in DllMain! */
- SIC_Initialize();
InitChangeNotifications();
}
else if (dwReason == DLL_PROCESS_DETACH)
Modified: trunk/reactos/dll/win32/shell32/wine/shellord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/she…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] Wed Dec 7 00:10:43 2016
@@ -1292,8 +1292,8 @@
*
*/
BOOL WINAPI FileIconInit(BOOL bFullInit)
-{ FIXME("(%s)\n", bFullInit ? "true" : "false");
- return FALSE;
+{
+ return SIC_Initialize();
}
/*************************************************************************