shell32: Implement FolderItems_get_Count.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-09-11 23:16:42 -06:00 committed by Alexandre Julliard
parent 93dd50666f
commit aac8d46c21
2 changed files with 5 additions and 10 deletions

View File

@ -1061,9 +1061,12 @@ 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);
*count = PathIsDirectoryW(V_BSTR(&This->dir)) ? This->item_count : 0;
return S_OK;
}
static HRESULT WINAPI FolderItemsImpl_get_Application(FolderItems3 *iface, IDispatch **ppid)

View File

@ -444,9 +444,7 @@ static void test_items(void)
r = FolderItems_get_Count(items, NULL);
r = FolderItems_get_Count(items, &count);
todo_wine
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
todo_wine
ok(!count, "expected 0 files, got %d\n", count);
V_VT(&var) = VT_I4;
@ -484,9 +482,7 @@ todo_wine
/* test that get_Count is not aware of the newly created files */
count = -1;
r = FolderItems_get_Count(items, &count);
todo_wine
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
todo_wine
ok(!count, "expected 0 files, got %d\n", count);
/* test that the newly created files CAN be retrieved by string index */
@ -514,9 +510,7 @@ todo_wine
count = -1;
r = FolderItems_get_Count(items, &count);
todo_wine
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
todo_wine
ok(count == sizeof(file_defs)/sizeof(file_defs[0]),
"expected %d files, got %d\n", (LONG)(sizeof(file_defs)/sizeof(file_defs[0])), count);
@ -737,9 +731,7 @@ todo_wine
/* test that everything stops working after the directory has been removed */
count = -1;
r = FolderItems_get_Count(items, &count);
todo_wine
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
todo_wine
ok(!count, "expected 0 files, got %d\n", count);
item = NULL;