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:
parent
93dd50666f
commit
aac8d46c21
|
@ -1061,9 +1061,12 @@ static HRESULT WINAPI FolderItemsImpl_Invoke(FolderItems3 *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI FolderItemsImpl_get_Count(FolderItems3 *iface, LONG *count)
|
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)
|
static HRESULT WINAPI FolderItemsImpl_get_Application(FolderItems3 *iface, IDispatch **ppid)
|
||||||
|
|
|
@ -444,9 +444,7 @@ static void test_items(void)
|
||||||
r = FolderItems_get_Count(items, NULL);
|
r = FolderItems_get_Count(items, NULL);
|
||||||
|
|
||||||
r = FolderItems_get_Count(items, &count);
|
r = FolderItems_get_Count(items, &count);
|
||||||
todo_wine
|
|
||||||
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
||||||
todo_wine
|
|
||||||
ok(!count, "expected 0 files, got %d\n", count);
|
ok(!count, "expected 0 files, got %d\n", count);
|
||||||
|
|
||||||
V_VT(&var) = VT_I4;
|
V_VT(&var) = VT_I4;
|
||||||
|
@ -484,9 +482,7 @@ todo_wine
|
||||||
/* test that get_Count is not aware of the newly created files */
|
/* test that get_Count is not aware of the newly created files */
|
||||||
count = -1;
|
count = -1;
|
||||||
r = FolderItems_get_Count(items, &count);
|
r = FolderItems_get_Count(items, &count);
|
||||||
todo_wine
|
|
||||||
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
||||||
todo_wine
|
|
||||||
ok(!count, "expected 0 files, got %d\n", count);
|
ok(!count, "expected 0 files, got %d\n", count);
|
||||||
|
|
||||||
/* test that the newly created files CAN be retrieved by string index */
|
/* test that the newly created files CAN be retrieved by string index */
|
||||||
|
@ -514,9 +510,7 @@ todo_wine
|
||||||
|
|
||||||
count = -1;
|
count = -1;
|
||||||
r = FolderItems_get_Count(items, &count);
|
r = FolderItems_get_Count(items, &count);
|
||||||
todo_wine
|
|
||||||
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
||||||
todo_wine
|
|
||||||
ok(count == sizeof(file_defs)/sizeof(file_defs[0]),
|
ok(count == sizeof(file_defs)/sizeof(file_defs[0]),
|
||||||
"expected %d files, got %d\n", (LONG)(sizeof(file_defs)/sizeof(file_defs[0])), count);
|
"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 */
|
/* test that everything stops working after the directory has been removed */
|
||||||
count = -1;
|
count = -1;
|
||||||
r = FolderItems_get_Count(items, &count);
|
r = FolderItems_get_Count(items, &count);
|
||||||
todo_wine
|
|
||||||
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r);
|
||||||
todo_wine
|
|
||||||
ok(!count, "expected 0 files, got %d\n", count);
|
ok(!count, "expected 0 files, got %d\n", count);
|
||||||
|
|
||||||
item = NULL;
|
item = NULL;
|
||||||
|
|
Loading…
Reference in New Issue