You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 330dc601978922aa1d5864d29d94882d6b1990d1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 71e2a33c1ecf912c000449971bcbae26a7797c6a Mon Sep 17 00:00:00 2001
|
||||
From 68d7bcf933fabf684262f42a152ddf4fa5c38577 Mon Sep 17 00:00:00 2001
|
||||
From: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
Date: Fri, 12 Oct 2018 11:57:18 +0200
|
||||
Subject: [PATCH] shell32: Improve semi-stub SHGetStockIconInfo, try find
|
||||
@@ -18,10 +18,10 @@ Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
2 files changed, 164 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
|
||||
index a1c91f4785e..48fc5744879 100644
|
||||
index 1851d0d0fc6..705b818083c 100644
|
||||
--- a/dlls/shell32/iconcache.c
|
||||
+++ b/dlls/shell32/iconcache.c
|
||||
@@ -1020,6 +1020,119 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
|
||||
@@ -1019,6 +1019,119 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ index a1c91f4785e..48fc5744879 100644
|
||||
/****************************************************************************
|
||||
* SHGetStockIconInfo [SHELL32.@]
|
||||
*
|
||||
@@ -1037,23 +1150,52 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
|
||||
@@ -1036,23 +1149,52 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
|
||||
*/
|
||||
HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO *sii)
|
||||
{
|
||||
@@ -202,23 +202,23 @@ index a1c91f4785e..48fc5744879 100644
|
||||
|
||||
return S_OK;
|
||||
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
|
||||
index edd536c3a01..05adcae57b2 100644
|
||||
index e4e1e664038..b2e95e5301a 100644
|
||||
--- a/dlls/shell32/tests/shelllink.c
|
||||
+++ b/dlls/shell32/tests/shelllink.c
|
||||
@@ -1073,6 +1073,21 @@ static void test_SHGetStockIconInfo(void)
|
||||
/* there is a NULL check for the struct */
|
||||
hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, NULL);
|
||||
ok(hr == E_INVALIDARG, "NULL: got 0x%x\n", hr);
|
||||
ok(hr == E_INVALIDARG, "NULL: got 0x%lx\n", hr);
|
||||
+
|
||||
+ for(i = 0; i < 140; i++) /* highest on wvista, i > 140 gives E_INVALIDARG, win7 can go higher */
|
||||
+ {
|
||||
+ memset(buffer, 0, sizeof(buffer));
|
||||
+ sii->cbSize = sizeof(SHSTOCKICONINFO);
|
||||
+ hr = pSHGetStockIconInfo(i, SHGSI_ICON | SHGSI_SMALLICON, sii);
|
||||
+ ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr);
|
||||
+ ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
|
||||
+ ok(sii->hIcon != NULL, "got NULL, expected an icon handle\n");
|
||||
+ ok(sii->iIcon != 0, "got unexpected 0 for SIID %d\n", i); /* howto find out exact sii->iIcon value??? */
|
||||
+ ok(sii->iSysImageIndex == -1, "got %d (expected -1)\n", sii->iSysImageIndex);
|
||||
+ ok(sii->iSysImageIndex == -1, "got %ld (expected -1)\n", sii->iSysImageIndex);
|
||||
+ ok(DestroyIcon(sii->hIcon), "DestroyIcon failed\n");
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("%3d: got iSysImageIndex %3d, iIcon %3d and %s\n", i, sii->iSysImageIndex,
|
||||
@@ -228,5 +228,5 @@ index edd536c3a01..05adcae57b2 100644
|
||||
|
||||
static void test_SHExtractIcons(void)
|
||||
--
|
||||
2.33.0
|
||||
2.35.1
|
||||
|
||||
|
Reference in New Issue
Block a user