Nikolay Sivov : shell32: Move SHGetImageList() to related source file.
Alexandre Julliard
julliard at winehq.org
Wed Mar 21 17:05:18 CDT 2018
Module: wine
Branch: master
Commit: 0075b05adff17a1ebcd4cfcd5addd86211004bce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0075b05adff17a1ebcd4cfcd5addd86211004bce
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Mar 21 09:27:13 2018 +0300
shell32: Move SHGetImageList() to related source file.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 e62e872..23e8203 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 058e57e..6fc49dc 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);
-}
More information about the wine-cvs
mailing list