Nikolay Sivov : comctl32/imagelist: Fix failure code for IImageList_Remove( ).

Alexandre Julliard julliard at winehq.org
Fri Aug 20 10:19:14 CDT 2010


Module: wine
Branch: master
Commit: 4023e0125fe49d477186445b7f35caa690dc2cdf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4023e0125fe49d477186445b7f35caa690dc2cdf

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Aug 19 10:13:43 2010 +0400

comctl32/imagelist: Fix failure code for IImageList_Remove().

---

 dlls/comctl32/imagelist.c       |    2 +-
 dlls/comctl32/tests/imagelist.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index c37c7a0..f0652e5 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -3314,7 +3314,7 @@ static HRESULT WINAPI ImageListImpl_Draw(IImageList *iface,
 
 static HRESULT WINAPI ImageListImpl_Remove(IImageList *iface, int i)
 {
-    return (ImageList_Remove((HIMAGELIST) iface, i) == 0) ? E_FAIL : S_OK;
+    return (ImageList_Remove((HIMAGELIST) iface, i) == 0) ? E_INVALIDARG : S_OK;
 }
 
 static HRESULT WINAPI ImageListImpl_GetIcon(IImageList *iface, int i, UINT flags,
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 191b796..a8e31da 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -1493,7 +1493,7 @@ static void test_IImageList_Add_Remove(void)
 
     /* remove when nothing exists */
     hr = IImageList_Remove(imgl, 0);
-    todo_wine ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
 
     /* removing everything from an empty imagelist should succeed */
     hr = IImageList_Remove(imgl, -1);
@@ -1505,7 +1505,7 @@ static void test_IImageList_Add_Remove(void)
     ok( IImageList_ReplaceIcon(imgl, -1, hicon3, &ret) == S_OK && (ret == 2),"failed to add icon3\n");
 
     /* remove an index out of range */
-    todo_wine ok( IImageList_Remove(imgl, 4711) == E_INVALIDARG, "got 0x%08x\n", hr);
+    ok( IImageList_Remove(imgl, 4711) == E_INVALIDARG, "got 0x%08x\n", hr);
 
     /* remove three */
     ok( IImageList_Remove(imgl,0) == S_OK, "can't remove 0\n");
@@ -1513,7 +1513,7 @@ static void test_IImageList_Add_Remove(void)
     ok( IImageList_Remove(imgl,0) == S_OK, "can't remove 0\n");
 
     /* remove one extra */
-    todo_wine ok( IImageList_Remove(imgl, 0) == E_INVALIDARG, "got 0x%08x\n", hr);
+    ok( IImageList_Remove(imgl, 0) == E_INVALIDARG, "got 0x%08x\n", hr);
 
     IImageList_Release(imgl);
     ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n");




More information about the wine-cvs mailing list