Commit 0df7cb2f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml6: Added support for CLSID_XMLSchemaCache60 in XMLSchemaCache60::QueryInterface.

parent 8c810372
......@@ -1105,6 +1105,18 @@ static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2* ifac
{
*ppvObject = iface;
}
else if(This->version == MSXML6 && IsEqualIID(riid, &CLSID_XMLSchemaCache60))
{
/*
* Version 6 can be queried for an interface with IID equal to CLSID.
* There is no public interface with that IID and returned pointer
* is equal to returned IXMLDOMSchemaCollection2 iface. We assume
* that it's just another way for querying IXMLDOMSchemaCollection2
* interface. Office 2013 ClickToRun installer uses this.
*/
WARN("riid CLSID_XMLSchemaCache60, returning IXMLDOMSchemaCollection2 interface.\n");
*ppvObject = iface;
}
else if (dispex_query_interface(&This->dispex, riid, ppvObject))
{
return *ppvObject ? S_OK : E_NOINTERFACE;
......
......@@ -1649,6 +1649,24 @@ static void test_remove(void)
free_bstrs();
}
static void test_ifaces(void)
{
IXMLDOMSchemaCollection2 *cache;
IUnknown *unk;
HRESULT hr;
cache = create_cache_version(60, &IID_IXMLDOMSchemaCollection2);
if (!cache) return;
/* CLSID_XMLSchemaCache60 is returned as an interface (the same as IXMLDOMSchemaCollection2). */
hr = IXMLDOMSchemaCollection2_QueryInterface(cache, &CLSID_XMLSchemaCache60, (void**)&unk);
ok (hr == S_OK, "Could not get CLSID_XMLSchemaCache60 iface: %08x\n", hr);
ok (unk == (IUnknown*)cache, "unk != cache\n");
IUnknown_Release(unk);
IXMLDOMSchemaCollection2_Release(cache);
}
START_TEST(schema)
{
HRESULT r;
......@@ -1666,6 +1684,7 @@ START_TEST(schema)
test_dispex();
test_get();
test_remove();
test_ifaces();
CoUninitialize();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment