Nikolay Sivov : msxml3: Added ISupportErrorInfo support for schema cache.
Alexandre Julliard
julliard at winehq.org
Mon Sep 9 16:08:09 CDT 2013
Module: wine
Branch: master
Commit: 26d42b9d5cda468acf46679118b063e15ef4c465
URL: http://source.winehq.org/git/wine.git/?a=commit;h=26d42b9d5cda468acf46679118b063e15ef4c465
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Sep 9 19:14:20 2013 +0400
msxml3: Added ISupportErrorInfo support for schema cache.
---
dlls/msxml3/schema.c | 10 ++++++++++
dlls/msxml3/tests/domdoc.c | 15 +++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index 1c11349..8c00f86 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -116,6 +116,12 @@ typedef struct
LONG ref;
} cache_entry;
+static const tid_t schema_cache_se_tids[] = {
+ IXMLDOMSchemaCollection_tid,
+ IXMLDOMSchemaCollection2_tid,
+ NULL_tid
+};
+
/* datatypes lookup stuff
* generated with help from gperf */
#define DT_MIN_STR_LEN 2
@@ -1105,6 +1111,10 @@ static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2* ifac
{
return *ppvObject ? S_OK : E_NOINTERFACE;
}
+ else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
+ {
+ return node_create_supporterrorinfo(schema_cache_se_tids, ppvObject);
+ }
else
{
FIXME("interface %s not implemented\n", debugstr_guid(riid));
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index a32eda8..921cb16 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -10712,6 +10712,7 @@ static void test_supporterrorinfo(void)
&IID_IXMLDOMDocument2, &IID_IXMLDOMDocument3 };
const supporterror_t *ptr = supporterror_test;
ISupportErrorInfo *errorinfo, *info2;
+ IXMLDOMSchemaCollection *schemacache;
IXMLDOMNamedNodeMap *map, *map2;
IXMLDOMDocument *doc;
IXMLDOMElement *elem;
@@ -10838,6 +10839,20 @@ static void test_supporterrorinfo(void)
IXMLDOMElement_Release(elem);
IXMLDOMDocument_Release(doc);
+
+ /* IXMLDOMSchemaCollection */
+ hr = CoCreateInstance(&CLSID_XMLSchemaCache, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMSchemaCollection, (void**)&schemacache);
+ ok(hr == S_OK, "failed to create schema collection, 0x%08x\n", hr);
+
+ hr = IXMLDOMSchemaCollection_QueryInterface(schemacache, &IID_ISupportErrorInfo, (void**)&errorinfo);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = ISupportErrorInfo_InterfaceSupportsErrorInfo(errorinfo, &IID_IXMLDOMSchemaCollection);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ ISupportErrorInfo_Release(errorinfo);
+ IXMLDOMSchemaCollection_Release(schemacache);
+
free_bstrs();
}
More information about the wine-cvs
mailing list