scrrun: Fix Skip() for file collection.
This commit is contained in:
parent
a9a2c9b539
commit
fac1c0d25b
|
@ -1001,9 +1001,22 @@ static HRESULT WINAPI filecoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt)
|
|||
|
||||
TRACE("(%p)->(%d)\n", This, celt);
|
||||
|
||||
while (FindNextFileW(handle, &data) && celt)
|
||||
if (!celt) return S_OK;
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
handle = start_enumeration(This->data.u.filecoll.coll->path, &data, TRUE);
|
||||
if (!handle) return S_FALSE;
|
||||
This->data.u.filecoll.find = handle;
|
||||
}
|
||||
else if (!FindNextFileW(handle, &data))
|
||||
return S_FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
if (is_file_data(&data))
|
||||
--celt;
|
||||
} while (celt && FindNextFileW(handle, &data));
|
||||
|
||||
return celt ? S_FALSE : S_OK;
|
||||
}
|
||||
|
|
|
@ -1106,7 +1106,6 @@ todo_wine
|
|||
hr = IEnumVARIANT_Reset(enumvar);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IEnumVARIANT_Skip(enumvar, 2);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IEnumVARIANT_Skip(enumvar, 0);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
@ -1119,9 +1118,7 @@ todo_wine
|
|||
ok(fetched == 0, "got %d\n", fetched);
|
||||
fetched = -1;
|
||||
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
|
||||
todo_wine
|
||||
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]);
|
||||
|
|
Loading…
Reference in New Issue