From 844aa7959e3daf57cfdf5350106b7d3a3c7c761e Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 8 Jan 2014 12:37:17 +0400 Subject: [PATCH] scrrun: Implement Clone() for folder collection. --- dlls/scrrun/filesystem.c | 7 ++++--- dlls/scrrun/tests/filesystem.c | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index 4802614c261..2ed64699bcd 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -144,6 +144,7 @@ static inline HRESULT create_error(DWORD err) static HRESULT create_folder(const WCHAR*, IFolder**); static HRESULT create_file(BSTR, IFile**); +static HRESULT create_foldercoll_enum(struct foldercollection*, IUnknown**); static inline BOOL is_dir_data(const WIN32_FIND_DATAW *data) { @@ -569,8 +570,8 @@ static HRESULT WINAPI foldercoll_enumvariant_Reset(IEnumVARIANT *iface) static HRESULT WINAPI foldercoll_enumvariant_Clone(IEnumVARIANT *iface, IEnumVARIANT **pclone) { struct enumvariant *This = impl_from_IEnumVARIANT(iface); - FIXME("(%p)->(%p): stub\n", This, pclone); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, pclone); + return create_foldercoll_enum(This->data.u.foldercoll.coll, (IUnknown**)pclone); } static const IEnumVARIANTVtbl foldercollenumvariantvtbl = { @@ -583,7 +584,7 @@ static const IEnumVARIANTVtbl foldercollenumvariantvtbl = { foldercoll_enumvariant_Clone }; -static HRESULT create_foldercoll_enum(struct foldercollection *collection, IUnknown **newenum) +HRESULT create_foldercoll_enum(struct foldercollection *collection, IUnknown **newenum) { struct enumvariant *This; diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index 00d768691de..6942a3defaa 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -863,12 +863,9 @@ static void test_FolderCollection(void) /* clone enumerator */ hr = IEnumVARIANT_Clone(enumvar, &clone); -todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); -if (hr == S_OK) { ok(clone != enumvar, "got %p, %p\n", enumvar, clone); IEnumVARIANT_Release(clone); -} hr = IEnumVARIANT_Reset(enumvar); ok(hr == S_OK, "got 0x%08x\n", hr);