Rebase against 2827471c57299793d8e0868679184f8d762a5309.

This commit is contained in:
Elizabeth Figura
2025-10-09 16:25:30 -05:00
parent 6f356eb1f5
commit ec458fc7ae
6 changed files with 1 additions and 1375 deletions

View File

@@ -1,43 +0,0 @@
From 9cf09446b0bf5da7988d1ba30c24d392c7a01f4b Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 12 Nov 2019 18:13:20 +0800
Subject: [PATCH] comctl32: Bump version to 6.0.
An application that I have here checks comctl32.dll version information
and refuses to run, changing DLL version to 6.0 makes it run.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/comctl32.rc | 2 +-
include/commctrl.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc
index 2c62dbe2720..473de211c67 100644
--- a/dlls/comctl32/comctl32.rc
+++ b/dlls/comctl32/comctl32.rc
@@ -113,7 +113,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
#define WINE_FILENAME_STR "comctl32.dll"
-#define WINE_FILEVERSION COMCTL32_VERSION,81,4704,1100
+#define WINE_FILEVERSION COMCTL32_VERSION,0,4704,1100
#include "wine/wine_common_ver.rc"
diff --git a/include/commctrl.h b/include/commctrl.h
index 235704a76dd..5a67c1284a0 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -59,7 +59,7 @@ enum _LI_METRIC
WINCOMMCTRLAPI HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE, const WCHAR *, int, int, HICON *);
WINCOMMCTRLAPI HRESULT WINAPI LoadIconMetric(HINSTANCE, const WCHAR *, int, HICON *);
-#define COMCTL32_VERSION 5 /* dll version */
+#define COMCTL32_VERSION 6 /* dll version */
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
--
2.47.2

View File

@@ -1,234 +0,0 @@
From da45b8dd00ab02ba03d8608afdf32085f5d28603 Mon Sep 17 00:00:00 2001
From: Connor McAdams <cmcadams@codeweavers.com>
Date: Wed, 17 Sep 2025 15:26:50 -0400
Subject: [PATCH] d3dx10: Create 3D textures for images representing 3D
textures.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
---
dlls/d3dx10_43/async.c | 11 +++++-
dlls/d3dx10_43/tests/d3dx10.c | 35 ++++++++++++------
dlls/d3dx10_43/texture.c | 69 +++++++++++++++++++++++++++--------
3 files changed, 86 insertions(+), 29 deletions(-)
diff --git a/dlls/d3dx10_43/async.c b/dlls/d3dx10_43/async.c
index 62627886804..e2cd14a7736 100644
--- a/dlls/d3dx10_43/async.c
+++ b/dlls/d3dx10_43/async.c
@@ -322,6 +322,8 @@ struct texture_processor
{
ID3DX10DataProcessor ID3DX10DataProcessor_iface;
ID3D10Device *device;
+ D3DX10_IMAGE_INFO img_info;
+ D3DX10_IMAGE_INFO *img_info_out;
D3DX10_IMAGE_LOAD_INFO load_info;
D3D10_SUBRESOURCE_DATA *resource_data;
};
@@ -334,6 +336,7 @@ static inline struct texture_processor *texture_processor_from_ID3DX10DataProces
static HRESULT WINAPI texture_processor_Process(ID3DX10DataProcessor *iface, void *data, SIZE_T size)
{
struct texture_processor *processor = texture_processor_from_ID3DX10DataProcessor(iface);
+ HRESULT hr;
TRACE("iface %p, data %p, size %Iu.\n", iface, data, size);
@@ -343,7 +346,10 @@ static HRESULT WINAPI texture_processor_Process(ID3DX10DataProcessor *iface, voi
free(processor->resource_data);
processor->resource_data = NULL;
}
- return load_texture_data(data, size, &processor->load_info, &processor->resource_data);
+ hr = load_texture_data(data, size, &processor->load_info, &processor->resource_data);
+ if (SUCCEEDED(hr) && processor->img_info_out)
+ *processor->img_info_out = processor->img_info;
+ return hr;
}
static HRESULT WINAPI texture_processor_CreateDeviceObject(ID3DX10DataProcessor *iface, void **object)
@@ -594,7 +600,10 @@ HRESULT WINAPI D3DX10CreateAsyncTextureProcessor(ID3D10Device *device,
object->ID3DX10DataProcessor_iface.lpVtbl = &texture_processor_vtbl;
object->device = device;
ID3D10Device_AddRef(device);
+ if (load_info)
+ object->img_info_out = load_info->pSrcInfo;
init_load_info(load_info, &object->load_info);
+ object->load_info.pSrcInfo = &object->img_info;
*processor = &object->ID3DX10DataProcessor_iface;
return S_OK;
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index f660b9a2953..818889138a5 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -20,6 +20,7 @@
#include "initguid.h"
#include "d3d10_1.h"
#include "d3dx10.h"
+#include "wine/wined3d.h"
#include "wine/test.h"
#include <stdint.h>
@@ -69,6 +70,8 @@
#define DDS_PF_BUMPLUMINANCE 0x00040000
#define DDS_PF_BUMPDUDV 0x00080000
+static bool wined3d_opengl;
+
struct dds_pixel_format
{
DWORD size;
@@ -1751,13 +1754,8 @@ static void check_test_image_load_info_resource_(uint32_t line, ID3D10Resource *
HRESULT hr;
ID3D10Resource_GetType(resource, &resource_dimension);
- todo_wine_if(image_load_info->expected_type == D3D10_RESOURCE_DIMENSION_TEXTURE3D)
- ok(resource_dimension == image_load_info->expected_type, "Got unexpected ResourceDimension %u, expected %u.\n",
- resource_dimension, image_load_info->expected_type);
-
- if (resource_dimension != image_load_info->expected_type)
- return;
-
+ ok(resource_dimension == image_load_info->expected_type, "Got unexpected ResourceDimension %u, expected %u.\n",
+ resource_dimension, image_load_info->expected_type);
switch (resource_dimension)
{
case D3D10_RESOURCE_DIMENSION_TEXTURE2D:
@@ -1826,10 +1824,9 @@ static void check_resource_info(ID3D10Resource *resource, const struct test_imag
}
ID3D10Resource_GetType(resource, &resource_dimension);
- todo_wine_if (image->expected_info.ResourceDimension == D3D10_RESOURCE_DIMENSION_TEXTURE3D)
- ok(resource_dimension == image->expected_info.ResourceDimension,
- "Got unexpected ResourceDimension %u, expected %u.\n",
- resource_dimension, image->expected_info.ResourceDimension);
+ ok(resource_dimension == image->expected_info.ResourceDimension,
+ "Got unexpected ResourceDimension %u, expected %u.\n",
+ resource_dimension, image->expected_info.ResourceDimension);
switch (resource_dimension)
{
@@ -2022,7 +2019,10 @@ static void check_resource_data(ID3D10Resource *resource, const struct test_imag
if (SUCCEEDED(ID3D10Resource_QueryInterface(resource, &IID_ID3D10Texture3D, (void **)&texture3d)))
{
- check_texture3d_data(texture3d, image, line);
+ if (wined3d_opengl && is_block_compressed(image->expected_info.Format))
+ skip("Skipping compressed format 3D texture readback test.\n");
+ else
+ check_texture3d_data(texture3d, image, line);
ID3D10Texture3D_Release(texture3d);
}
else if (SUCCEEDED(ID3D10Resource_QueryInterface(resource, &IID_ID3D10Texture2D, (void **)&texture2d)))
@@ -5992,6 +5992,17 @@ static void test_preprocess_shader(void)
START_TEST(d3dx10)
{
+ HMODULE wined3d;
+
+ if ((wined3d = GetModuleHandleA("wined3d.dll")))
+ {
+ enum wined3d_renderer (CDECL *p_wined3d_get_renderer)(void);
+
+ if ((p_wined3d_get_renderer = (void *)GetProcAddress(wined3d, "wined3d_get_renderer"))
+ && p_wined3d_get_renderer() == WINED3D_RENDERER_OPENGL)
+ wined3d_opengl = true;
+ }
+
test_D3DX10UnsetAllDeviceObjects();
test_D3DX10CreateAsyncMemoryLoader();
test_D3DX10CreateAsyncFileLoader();
diff --git a/dlls/d3dx10_43/texture.c b/dlls/d3dx10_43/texture.c
index 4d279bccbd5..a21ce7ff139 100644
--- a/dlls/d3dx10_43/texture.c
+++ b/dlls/d3dx10_43/texture.c
@@ -439,9 +439,12 @@ static HRESULT create_texture(ID3D10Device *device, const void *data, SIZE_T siz
{
D3D10_SUBRESOURCE_DATA *resource_data;
D3DX10_IMAGE_LOAD_INFO load_info_copy;
+ D3DX10_IMAGE_INFO img_info;
HRESULT hr;
init_load_info(load_info, &load_info_copy);
+ if (!load_info_copy.pSrcInfo)
+ load_info_copy.pSrcInfo = &img_info;
if (FAILED((hr = load_texture_data(data, size, &load_info_copy, &resource_data))))
return hr;
@@ -774,25 +777,59 @@ end:
HRESULT create_d3d_texture(ID3D10Device *device, D3DX10_IMAGE_LOAD_INFO *load_info,
D3D10_SUBRESOURCE_DATA *resource_data, ID3D10Resource **texture)
{
- D3D10_TEXTURE2D_DESC texture_2d_desc;
- ID3D10Texture2D *texture_2d;
HRESULT hr;
- memset(&texture_2d_desc, 0, sizeof(texture_2d_desc));
- texture_2d_desc.Width = load_info->Width;
- texture_2d_desc.Height = load_info->Height;
- texture_2d_desc.MipLevels = load_info->MipLevels;
- texture_2d_desc.ArraySize = load_info->MiscFlags & D3D10_RESOURCE_MISC_TEXTURECUBE ? 6 : 1;
- texture_2d_desc.Format = load_info->Format;
- texture_2d_desc.SampleDesc.Count = 1;
- texture_2d_desc.Usage = load_info->Usage;
- texture_2d_desc.BindFlags = load_info->BindFlags;
- texture_2d_desc.MiscFlags = load_info->MiscFlags;
-
- if (FAILED(hr = ID3D10Device_CreateTexture2D(device, &texture_2d_desc, resource_data, &texture_2d)))
- return hr;
+ *texture = NULL;
+ switch (load_info->pSrcInfo->ResourceDimension)
+ {
+ case D3D10_RESOURCE_DIMENSION_TEXTURE2D:
+ {
+ D3D10_TEXTURE2D_DESC texture_2d_desc = { 0 };
+ ID3D10Texture2D *texture_2d;
+
+ texture_2d_desc.Width = load_info->Width;
+ texture_2d_desc.Height = load_info->Height;
+ texture_2d_desc.MipLevels = load_info->MipLevels;
+ texture_2d_desc.ArraySize = load_info->pSrcInfo->ArraySize;
+ texture_2d_desc.Format = load_info->Format;
+ texture_2d_desc.SampleDesc.Count = 1;
+ texture_2d_desc.Usage = load_info->Usage;
+ texture_2d_desc.BindFlags = load_info->BindFlags;
+ texture_2d_desc.CPUAccessFlags = load_info->CpuAccessFlags;
+ texture_2d_desc.MiscFlags = load_info->MiscFlags;
+
+ if (FAILED(hr = ID3D10Device_CreateTexture2D(device, &texture_2d_desc, resource_data, &texture_2d)))
+ return hr;
+ *texture = (ID3D10Resource *)texture_2d;
+ break;
+ }
+
+ case D3D10_RESOURCE_DIMENSION_TEXTURE3D:
+ {
+ D3D10_TEXTURE3D_DESC texture_3d_desc = { 0 };
+ ID3D10Texture3D *texture_3d;
+
+ texture_3d_desc.Width = load_info->Width;
+ texture_3d_desc.Height = load_info->Height;
+ texture_3d_desc.Depth = load_info->Depth;
+ texture_3d_desc.MipLevels = load_info->MipLevels;
+ texture_3d_desc.Format = load_info->Format;
+ texture_3d_desc.Usage = load_info->Usage;
+ texture_3d_desc.BindFlags = load_info->BindFlags;
+ texture_3d_desc.CPUAccessFlags = load_info->CpuAccessFlags;
+ texture_3d_desc.MiscFlags = load_info->MiscFlags;
+
+ if (FAILED(hr = ID3D10Device_CreateTexture3D(device, &texture_3d_desc, resource_data, &texture_3d)))
+ return hr;
+ *texture = (ID3D10Resource *)texture_3d;
+ break;
+ }
+
+ default:
+ FIXME("Unhandled resource dimension %d.\n", load_info->pSrcInfo->ResourceDimension);
+ return E_NOTIMPL;
+ }
- *texture = (ID3D10Resource *)texture_2d;
return S_OK;
}
--
2.51.0

View File

@@ -1,234 +0,0 @@
From 0d5690ffe44182224aef5488508a8eeb2750e757 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
existing iconhandle
v3: try find handle to existing icon
this is the best I can come up with for now, on windows afaict all these icons mostly come from imegares.dll
so the attached patch is not really how windows does it
Fix for bug https://bugs.winehq.org/show_bug.cgi?id=45868
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
dlls/shell32/iconcache.c | 156 +++++++++++++++++++++++++++++++--
dlls/shell32/tests/shelllink.c | 15 ++++
2 files changed, 164 insertions(+), 7 deletions(-)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index 03eea049d0c..4a84b2055fe 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -1021,6 +1021,119 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
return -1;
}
+/****************************************************************************
+ * For SHGetStockIconInfo
+ */
+typedef struct {
+ SHSTOCKICONID id;
+ DWORD iconid;
+} SI_ENTRY;
+
+static const SI_ENTRY si_table[] =
+{
+ [0] = { SIID_DOCNOASSOC, IDI_SHELL_FILE},
+ [1] = { SIID_DOCASSOC, IDI_SHELL_DOCUMENT},
+ [2] = { SIID_APPLICATION, IDI_SHELL_WINDOW},
+ [3] = { SIID_FOLDER, IDI_SHELL_FOLDER},
+ [4] = { SIID_FOLDEROPEN, IDI_SHELL_FOLDER_OPEN},
+ [5] = { SIID_DRIVE525, 0},
+ [6] = { SIID_DRIVE35, 0},
+ [7] = { SIID_DRIVERREMOVE, 0},
+ [8] = { SIID_DRIVERFIXED, IDI_SHELL_DRIVE},
+ [9] = { SIID_DRIVERNET, IDI_SHELL_NETDRIVE},
+ [10] = { SIID_DRIVERNETDISABLE, IDI_SHELL_NETDRIVE2},
+ [11] = { SIID_DRIVERCD, IDI_SHELL_OPTICAL_DRIVE},
+ [12] = { SIID_DRIVERRAM, IDI_SHELL_RAMDISK},
+ [13] = { SIID_WORLD, 0},
+ /* Missing: 14 */
+ [15] = { SIID_SERVER, 0},
+ [16] = { SIID_PRINTER, IDI_SHELL_PRINT},
+ [17] = { SIID_MYNETWORK, 0},
+ /* Missing: 18 - 21 */
+ [22] = { SIID_FIND, 0},
+ [23] = { SIID_HELP, IDI_SHELL_HELP},
+ /* Missing: 24 - 27 */
+ [28] = {SIID_SHARE, 0},
+ [29] = {SIID_LINK, 0},
+ [30] = {SIID_SLOWFILE, 0},
+ [31] = {SIID_RECYCLER, IDI_SHELL_TRASH_FOLDER},
+ [32] = {SIID_RECYCLERFULL, IDI_SHELL_FULL_RECYCLE_BIN},
+ /* Missing: 33 - 39 */
+ [40] = {SIID_MEDIACDAUDIO, 0},
+ /* Missing: 41 - 46 */
+ [47] = {SIID_LOCK, IDI_SHELL_PASSWORDS},
+ /* Missing: 48 */
+ [49] = {SIID_AUTOLIST, 0},
+ [50] = {SIID_PRINTERNET, 0},
+ [51] = {SIID_SERVERSHARE, 0},
+ [52] = {SIID_PRINTERFAX, 0},
+ [53] = {SIID_PRINTERFAXNET, 0},
+ [54] = {SIID_PRINTERFILE, 0},
+ [55] = {SIID_STACK, 0},
+ [56] = {SIID_MEDIASVCD, 0},
+ [57] = {SIID_STUFFEDFOLDER, 0},
+ [58] = {SIID_DRIVEUNKNOWN, 0},
+ [59] = {SIID_DRIVEDVD, 0},
+ [60] = {SIID_MEDIADVD, 0},
+ [61] = {SIID_MEDIADVDRAM, 0},
+ [62] = {SIID_MEDIADVDRW, 0},
+ [63] = {SIID_MEDIADVDR, 0},
+ [64] = {SIID_MEDIADVDROM, 0},
+ [65] = {SIID_MEDIACDAUDIOPLUS, 0},
+ [66] = {SIID_MEDIACDRW, 0},
+ [67] = {SIID_MEDIACDR, 0},
+ [68] = {SIID_MEDIACDBURN, 0},
+ [69] = {SIID_MEDIABLANKCD, 0},
+ [70] = {SIID_MEDIACDROM, 0},
+ [71] = {SIID_AUDIOFILES, IDI_SHELL_AUDIO_FILE},
+ [72] = {SIID_IMAGEFILES, IDI_SHELL_IMAGE_FILE},
+ [73] = {SIID_VIDEOFILES, IDI_SHELL_VIDEO_FILE},
+ [74] = {SIID_MIXEDFILES, 0},
+ [75] = {SIID_FOLDERBACK, 0},
+ [76] = {SIID_FOLDERFRONT, 0},
+ [77] = {SIID_SHIELD, 0},
+ [78] = {SIID_WARNING, 0},
+ [79] = {SIID_INFO, 0},
+ [80] = {SIID_ERROR, 0},
+ [81] = {SIID_KEY, 0},
+ [82] = {SIID_SOFTWARE, 0},
+ [83] = {SIID_RENAME, IDI_SHELL_RENAME},
+ [84] = {SIID_DELETE, IDI_SHELL_CONFIRM_DELETE},
+ [85] = {SIID_MEDIAAUDIODVD, 0},
+ [86] = {SIID_MEDIAMOVIEDVD, 0},
+ [87] = {SIID_MEDIAENHANCEDCD, 0},
+ [88] = {SIID_MEDIAENHANCEDDVD, 0},
+ [89] = {SIID_MEDIAHDDVD, 0},
+ [90] = {SIID_MEDIABLUERAY, 0},
+ [91] = {SIID_MEDIAVCD, 0},
+ [92] = {SIID_MEDIADVDPLUSR, 0},
+ [93] = {SIID_MEDIADVDPLUSRW, 0},
+ [94] = {SIID_DESKTOPPC, IDI_SHELL_MY_COMPUTER},
+ [95] = {SIID_MOBILEPC, 0},
+ [96] = {SIID_USERS, IDI_SHELL_USERS},
+ [97] = {SIID_MEDIASMARTMEDIA, 0},
+ [98] = {SIID_MEDIACOMPACTFLASH, 0},
+ [99] = {SIID_DEVICECELLPHONE, 0},
+ [100] = {SIID_DEVICECAMERA, 0},
+ [101] = {SIID_DEVICEVIDEOCAMERA, 0},
+ [102] = {SIID_DEVICEAUDIOPLAYER, 0},
+ [103] = {SIID_NETWORKCONNECT, 0},
+ [104] = {SIID_INTERNET, IDI_SHELL_WEB_BROWSER},
+ [105] = {SIID_ZIPFILE, 0},
+ [106] = {SIID_SETTINGS, IDI_SHELL_SETTINGS},
+ /* Missing: 107 - 131 */
+ [132] = {SIID_DRIVEHDDVD, 0},
+ [133] = {SIID_DRIVEBD, 0},
+ [134] = {SIID_MEDIAHDDVDROM, 0},
+ [135] = {SIID_MEDIAHDDVDR, 0},
+ [136] = {SIID_MEDIAHDDVDRAM, 0},
+ [137] = {SIID_MEDIABDROM, 0},
+ [138] = {SIID_MEDIABDR, 0},
+ [139] = {SIID_MEDIABDRE, 0},
+ [140] = {SIID_CLUSTEREDDRIVE, 0}
+ /* Missing: 141 - 180 and SIID_MAX_ICONS = 181*/
+ };
+
/****************************************************************************
* SHGetStockIconInfo [SHELL32.@]
*
@@ -1038,25 +1151,54 @@ INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex)
*/
HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO *sii)
{
- FIXME("(%d, 0x%x, %p) semi-stub\n", id, flags, sii);
+ HMODULE hmod;
+
+ TRACE("(%d, 0x%x, %p)\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_FILE;
lstrcatW(sii->szPath, L"\\shell32.dll");
- if (flags)
- FIXME("flags 0x%x not implemented\n", flags);
-
sii->hIcon = NULL;
if (flags & SHGSI_ICON)
sii->hIcon = LoadIconW(GetModuleHandleW(sii->szPath), MAKEINTRESOURCEW(sii->iIcon));
sii->iSysImageIndex = -1;
+ /* this is not how windows does it, on windows picked mostly from imageres.dll !*/
+ if (si_table[id].iconid)
+ sii->iIcon = sii->iSysImageIndex - si_table[id].id;
+ else
+ {
+ FIXME("Couldn`t find SIID %d, returning default values (IDI_SHELL_FILE)\n", id);
+ sii->iIcon = sii->iSysImageIndex - IDI_SHELL_FILE;
+ }
+
+ if (flags & SHGSI_ICON)
+ {
+ flags &= ~SHGSI_ICON;
+
+ hmod = GetModuleHandleW(L"shell32.dll");
+ if (hmod)
+ {
+ if (si_table[id].iconid)
+ sii->hIcon = LoadIconW(hmod, MAKEINTRESOURCEW(si_table[id].iconid));
+ else
+ sii->hIcon = LoadIconW(hmod, MAKEINTRESOURCEW(IDI_SHELL_FILE));
+ }
+
+ if (!sii->hIcon)
+ {
+ ERR("failed to get an icon handle\n");
+ return E_INVALIDARG;
+ }
+ }
+
+ if (flags)
+ FIXME("flags 0x%x not implemented\n", flags);
+
TRACE("%3d: returning %s (%d)\n", id, debugstr_w(sii->szPath), sii->iIcon);
return S_OK;
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index f13155ade2f..c70bc9d5946 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -1119,6 +1119,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%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%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(DestroyIcon(sii->hIcon), "DestroyIcon failed\n");
+ if (winetest_debug > 1)
+ trace("%3d: got iSysImageIndex %3d, iIcon %3d and %s\n", i, sii->iSysImageIndex,
+ sii->iIcon, wine_dbgstr_w(sii->szPath));
+ }
}
static void test_SHExtractIcons(void)
--
2.43.0

View File

@@ -1 +0,0 @@
Fixes: [45868] Improve semi-stub SHGetStockIconInfo

View File

@@ -1 +1 @@
c1bafaa02329442df1aba576e2884c0ab699f76e
2827471c57299793d8e0868679184f8d762a5309