From: Alex Henrie Subject: [PATCH v2 3/3] shell32: Implement FolderItems_get_Count. Message-Id: <20160722035140.10143-3-alexhenrie24@gmail.com> Date: Thu, 21 Jul 2016 21:51:10 -0600 In-Reply-To: <20160722035140.10143-1-alexhenrie24@gmail.com> References: <20160722035140.10143-1-alexhenrie24@gmail.com> Signed-off-by: Alex Henrie --- dlls/shell32/shelldispatch.c | 10 ++++++++-- dlls/shell32/tests/shelldispatch.c | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c index 4b4c822..fe806cc 100644 --- a/dlls/shell32/shelldispatch.c +++ b/dlls/shell32/shelldispatch.c @@ -1059,9 +1059,15 @@ static HRESULT WINAPI FolderItemsImpl_Invoke(FolderItems3 *iface, static HRESULT WINAPI FolderItemsImpl_get_Count(FolderItems3 *iface, LONG *count) { - FIXME("(%p,%p)\n", iface, count); + FolderItemsImpl *This = impl_from_FolderItems(iface); - return E_NOTIMPL; + TRACE("(%p,%p)\n", iface, count); + + if (!count) + return E_INVALIDARG; + + *count = This->item_count; + return S_OK; } static HRESULT WINAPI FolderItemsImpl_get_Application(FolderItems3 *iface, IDispatch **ppid) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index be3db18..bcd1a61 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -378,9 +378,7 @@ static void test_items(void) r = FolderItems_get_Count(items, NULL); r = FolderItems_get_Count(items, &lcount); -todo_wine ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); -todo_wine ok(!lcount, "expected 0 files, got %d\n", lcount); V_VT(&var) = VT_I4; @@ -427,9 +425,7 @@ todo_wine lcount = -1; r = FolderItems_get_Count(items, &lcount); -todo_wine ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); -todo_wine ok(!lcount, "expected 0 files, got %d\n", lcount); FolderItems_Release(items); @@ -447,9 +443,7 @@ todo_wine lcount = -1; r = FolderItems_get_Count(items, &lcount); -todo_wine ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); -todo_wine ok(lcount == sizeof(file_defs)/sizeof(file_defs[0]), "expected %d files, got %d\n", sizeof(file_defs)/sizeof(file_defs[0]), lcount); -- 2.9.0