scrrun: IEnumVARIANT::Next should always return number of fetched folder elements.

This commit is contained in:
Dmitry Timoshkov 2014-01-28 11:36:07 +09:00 committed by Alexandre Julliard
parent 8f69ecdff7
commit f5279ad37d
2 changed files with 1 additions and 5 deletions

View File

@ -545,13 +545,10 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel
}
} while (FindNextFileW(handle, &data));
if (count < celt)
return S_FALSE;
if (fetched)
*fetched = count;
return S_OK;
return (count < celt) ? S_FALSE : S_OK;
}
static HRESULT WINAPI foldercoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt)

View File

@ -942,7 +942,6 @@ todo_wine
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
todo_wine
ok(fetched == 1, "got %d\n", fetched);
ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0]));
VariantClear(&var2[0]);