scrrun: Implement Clone() for drive collection.

Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gijs Vermeulen 2019-03-28 18:52:34 +01:00 committed by Alexandre Julliard
parent 0c4acb6104
commit b7afaec818
2 changed files with 5 additions and 9 deletions

View File

@ -197,6 +197,7 @@ static HRESULT create_folder(const WCHAR*, IFolder**);
static HRESULT create_file(BSTR, IFile**); static HRESULT create_file(BSTR, IFile**);
static HRESULT create_foldercoll_enum(struct foldercollection*, IUnknown**); static HRESULT create_foldercoll_enum(struct foldercollection*, IUnknown**);
static HRESULT create_filecoll_enum(struct filecollection*, IUnknown**); static HRESULT create_filecoll_enum(struct filecollection*, IUnknown**);
static HRESULT create_drivecoll_enum(struct drivecollection*, IUnknown**);
static inline BOOL is_dir_data(const WIN32_FIND_DATAW *data) static inline BOOL is_dir_data(const WIN32_FIND_DATAW *data)
{ {
@ -1555,8 +1556,8 @@ static HRESULT WINAPI drivecoll_enumvariant_Reset(IEnumVARIANT *iface)
static HRESULT WINAPI drivecoll_enumvariant_Clone(IEnumVARIANT *iface, IEnumVARIANT **pclone) static HRESULT WINAPI drivecoll_enumvariant_Clone(IEnumVARIANT *iface, IEnumVARIANT **pclone)
{ {
struct enumvariant *This = impl_from_IEnumVARIANT(iface); struct enumvariant *This = impl_from_IEnumVARIANT(iface);
FIXME("(%p)->(%p): stub\n", This, pclone); TRACE("(%p)->(%p)\n", This, pclone);
return E_NOTIMPL; return create_drivecoll_enum(This->data.u.drivecoll.coll, (IUnknown**)pclone);
} }
static const IEnumVARIANTVtbl drivecollenumvariantvtbl = { static const IEnumVARIANTVtbl drivecollenumvariantvtbl = {

View File

@ -1361,7 +1361,7 @@ static void test_FileCollection(void)
static void test_DriveCollection(void) static void test_DriveCollection(void)
{ {
IDriveCollection *drives; IDriveCollection *drives;
IEnumVARIANT *enumvar, *clone; IEnumVARIANT *enumvar;
ULONG fetched; ULONG fetched;
VARIANT var; VARIANT var;
HRESULT hr; HRESULT hr;
@ -1398,11 +1398,6 @@ static void test_DriveCollection(void)
hr = IEnumVARIANT_Skip(enumvar, 1); hr = IEnumVARIANT_Skip(enumvar, 1);
ok(hr == S_FALSE, "got 0x%08x\n", hr); ok(hr == S_FALSE, "got 0x%08x\n", hr);
hr = IEnumVARIANT_Reset(enumvar);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IEnumVARIANT_Clone(enumvar, &clone);
if(hr == S_OK)
test_clone(enumvar, TRUE); test_clone(enumvar, TRUE);
while (IEnumVARIANT_Next(enumvar, 1, &var, &fetched) == S_OK) { while (IEnumVARIANT_Next(enumvar, 1, &var, &fetched) == S_OK) {