[PATCH 1/2] shell32: Add a semi-stub for SHGetStockIconInfo

Detlef Riekenberg wine.dev at web.de
Wed Apr 24 10:38:40 CDT 2013


--
By by ... Detlef
---
 dlls/shell32/iconcache.c  |   42 ++++++++++++++++++++++++++++++++++++++++++
 dlls/shell32/shell32.spec |    1 +
 2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index 637dbca..df6675d 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -46,6 +46,8 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
+static const WCHAR shell32dll[] = {'\\','s','h','e','l','l','3','2','.','d','l','l',0};
+
 /********************** THE ICON CACHE ********************************/
 
 #define INVALID_INDEX -1
@@ -876,3 +878,43 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
 
   return -1;
 }
+
+/****************************************************************************
+ * SHGetStockIconInfo [SHELL32.@]
+ *
+ * Receive informations for builtin icons
+ *
+ * PARAMS
+ *  id      [I]  selected icon-id to get informations
+ *  flags   [I]  select informations to receive
+ *  sii     [IO] SHSTOCKICONINFO structure to fill
+ *
+ * RETURNS
+ *  Success: S_OK
+ *  Failure: A HRESULT failure code
+ *
+ */
+HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO *sii)
+{
+
+    FIXME("(%d, 0x%x, %p) semi-stub\n", id, flags, sii);
+    if ((id < 0) || (id >= SIID_MAX_ICONS) || !sii || (sii->cbSize != sizeof(SHSTOCKICONINFO))) {
+        return E_INVALIDARG;
+    }
+
+    GetSystemDirectoryW(sii->szPath, MAX_PATH);
+
+    /* no icons defined: use default */
+    sii->iIcon = -IDI_SHELL_DOCUMENT,
+    lstrcatW(sii->szPath, shell32dll);
+
+    if (flags)
+        FIXME("flags 0x%x not implemented\n", flags);
+
+    sii->hIcon = NULL;
+    sii->iSysImageIndex = -1;
+
+    TRACE("%3d: returning %s (%d)\n", id, debugstr_w(sii->szPath), sii->iIcon);
+
+    return S_OK;
+}
diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index 0f991a4..5044479 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -388,6 +388,7 @@
 @ stdcall SHGetSpecialFolderLocation(long long ptr)
 @ stdcall SHGetSpecialFolderPathA(long ptr long long)
 @ stdcall SHGetSpecialFolderPathW(long ptr long long)
+@ stdcall SHGetStockIconInfo(long long ptr)
 @ stdcall SHHelpShortcuts_RunDLL(long long long long) SHHelpShortcuts_RunDLLA
 @ stdcall SHHelpShortcuts_RunDLLA(long long long long)
 @ stdcall SHHelpShortcuts_RunDLLW(long long long long)
-- 
1.7.5.4




More information about the wine-patches mailing list