msxml3: Add separate QueryInterface implementation for IEnumVARIANT interface exported by IXMLElementCollection.

This commit is contained in:
Dmitry Timoshkov 2014-01-31 15:18:26 +09:00 committed by Alexandre Julliard
parent de3ec1c55c
commit 9ab9aebf65
2 changed files with 14 additions and 3 deletions

View File

@ -729,9 +729,7 @@ static void test_xmlelem_collection(void)
enumVar = (void *)0xdeadbeef;
hr = IUnknown_QueryInterface(unk, &IID_IXMLElementCollection, (LPVOID *)&enumVar);
todo_wine
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
todo_wine
ok(enumVar == NULL || broken(enumVar == (void *)0xdeadbeef) /* XP */, "Expected NULL, got %p\n", enumVar);
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (LPVOID *)&enumVar);

View File

@ -718,7 +718,20 @@ static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_QueryInterface(
IEnumVARIANT *iface, REFIID riid, LPVOID *ppvObj)
{
xmlelem_collection *this = impl_from_IEnumVARIANT(iface);
return IXMLDocument_QueryInterface((IXMLDocument *)this, riid, ppvObj);
TRACE("(%p)->(%s %p)\n", this, debugstr_guid(riid), ppvObj);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IEnumVARIANT))
{
*ppvObj = iface;
IEnumVARIANT_AddRef(iface);
return S_OK;
}
FIXME("interface %s not implemented\n", debugstr_guid(riid));
*ppvObj = NULL;
return E_NOINTERFACE;
}
static ULONG WINAPI xmlelem_collection_IEnumVARIANT_AddRef(