Ziqing Hui : user32: Pass correct flags in CreateIconFromResource().

Alexandre Julliard julliard at winehq.org
Thu Dec 9 15:34:27 CST 2021


Module: wine
Branch: master
Commit: d112d746c715aef464c71ebf801cfcf67d573914
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d112d746c715aef464c71ebf801cfcf67d573914

Author: Ziqing Hui <zhui at codeweavers.com>
Date:   Thu Dec  9 11:20:56 2021 +0800

user32: Pass correct flags in CreateIconFromResource().

Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/cursoricon.c       | 2 +-
 dlls/user32/tests/cursoricon.c | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index f107255c8c0..827db302a30 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -1592,7 +1592,7 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
 HICON WINAPI CreateIconFromResource( LPBYTE bits, UINT cbSize,
                                            BOOL bIcon, DWORD dwVersion)
 {
-    return CreateIconFromResourceEx( bits, cbSize, bIcon, dwVersion, 0,0,0);
+    return CreateIconFromResourceEx( bits, cbSize, bIcon, dwVersion, 0, 0, LR_DEFAULTSIZE | LR_SHARED );
 }
 
 
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index d73650e08f7..1bbe2591d59 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -1595,10 +1595,8 @@ static void test_CreateIconFromResource(void)
     /* Test the icon information. */
     SetLastError(0xdeadbeef);
     ret = GetIconInfo(handle, &icon_info);
-    todo_wine
     ok(ret, "GetIconInfo() failed.\n");
     error = GetLastError();
-    todo_wine
     ok(error == 0xdeadbeef, "Last error: %u\n", error);
 
     if (ret)
@@ -1616,14 +1614,10 @@ static void test_CreateIconFromResource(void)
         ICONINFOEXA infoex;
         infoex.cbSize = sizeof(infoex);
         ret = pGetIconInfoExA( handle, &infoex );
-        todo_wine
         ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() );
-        if (ret)
-        {
         ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID );
         ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName );
         ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName );
-        }
     }
 
     /* Test creating an icon. */
@@ -1637,10 +1631,8 @@ static void test_CreateIconFromResource(void)
     /* Test the icon information. */
     SetLastError(0xdeadbeef);
     ret = GetIconInfo(handle, &icon_info);
-    todo_wine
     ok(ret, "GetIconInfo() failed.\n");
     error = GetLastError();
-    todo_wine
     ok(error == 0xdeadbeef, "Last error: %u\n", error);
 
     if (ret)




More information about the wine-cvs mailing list