[PATCH 3/6] shell32: Move SHGetImageList() to related source file
Nikolay Sivov
nsivov at codeweavers.com
Wed Mar 21 01:27:13 CDT 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/shell32/iconcache.c | 27 +++++++++++++++++++++++++++
dlls/shell32/shellord.c | 28 ----------------------------
2 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index e62e872f14..23e820322e 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -1022,3 +1022,30 @@ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO
return S_OK;
}
+
+/*************************************************************************
+ * SHGetImageList (SHELL32.727)
+ *
+ * Returns a copy of a shell image list.
+ *
+ * NOTES
+ * Windows XP features 4 sizes of image list, and Vista 5. Wine currently
+ * only supports the traditional small and large image lists, so requests
+ * for the others will currently fail.
+ */
+HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
+{
+ /* Wine currently only maintains large and small image lists */
+ if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL))
+ {
+ FIXME("Unsupported image list %i requested\n", iImageList);
+ return E_FAIL;
+ }
+
+ InitOnceExecuteOnce( &sic_init_once, SIC_Initialize, NULL, NULL );
+
+ if (iImageList == SHIL_SYSSMALL)
+ iImageList = SHIL_SMALL;
+
+ return HIMAGELIST_QueryInterface(shell_imagelists[iImageList], riid, ppv);
+}
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 058e57e5b5..6fc49dcd59 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -2133,31 +2133,3 @@ BOOL WINAPI LinkWindow_UnregisterClass(void)
void WINAPI SHFlushSFCache(void)
{
}
-
-/*************************************************************************
- * SHGetImageList (SHELL32.727)
- *
- * Returns a copy of a shell image list.
- *
- * NOTES
- * Windows XP features 4 sizes of image list, and Vista 5. Wine currently
- * only supports the traditional small and large image lists, so requests
- * for the others will currently fail.
- */
-HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
-{
- HIMAGELIST hLarge, hSmall;
- HIMAGELIST hNew;
-
- /* Wine currently only maintains large and small image lists */
- if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL))
- {
- FIXME("Unsupported image list %i requested\n", iImageList);
- return E_FAIL;
- }
-
- Shell_GetImageLists(&hLarge, &hSmall);
- hNew = (iImageList == SHIL_LARGE) ? hLarge : hSmall;
-
- return HIMAGELIST_QueryInterface(hNew, riid, ppv);
-}
--
2.16.2
More information about the wine-devel
mailing list