scrrun: Implement Clone() for folder collection.

This commit is contained in:
Nikolay Sivov 2014-01-08 12:37:17 +04:00 committed by Alexandre Julliard
parent c1b7a075ca
commit 844aa7959e
2 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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);