Commit 7a62e46f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Support IDispatchEx for IXMLDOMParseError.

parent 5e327242
......@@ -44,6 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef struct
{
DispatchEx dispex;
IXMLDOMParseError IXMLDOMParseError_iface;
LONG ref;
LONG code, line, linepos, filepos;
......@@ -70,6 +71,10 @@ static HRESULT WINAPI parseError_QueryInterface(
{
*ppvObject = iface;
}
else if (dispex_query_interface(&This->dispex, riid, ppvObject))
{
return *ppvObject ? S_OK : E_NOINTERFACE;
}
else
{
FIXME("interface %s not implemented\n", debugstr_guid(riid));
......@@ -103,6 +108,7 @@ static ULONG WINAPI parseError_Release(
SysFreeString(This->url);
SysFreeString(This->reason);
SysFreeString(This->srcText);
release_dispex(&This->dispex);
heap_free( This );
}
......@@ -289,6 +295,18 @@ static const struct IXMLDOMParseErrorVtbl parseError_vtbl =
parseError_get_filepos
};
static const tid_t parseError_iface_tids[] = {
IXMLDOMParseError_tid,
0
};
static dispex_static_data_t parseError_dispex = {
NULL,
IXMLDOMParseError_tid,
NULL,
parseError_iface_tids
};
IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
LONG line, LONG linepos, LONG filepos )
{
......@@ -309,5 +327,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
This->linepos = linepos;
This->filepos = filepos;
init_dispex(&This->dispex, (IUnknown*)&This->IXMLDOMParseError_iface, &parseError_dispex);
return &This->IXMLDOMParseError_iface;
}
......@@ -10627,6 +10627,7 @@ static void test_dispex(void)
{
const DOMNodeType *type = dispex_types_test;
IXMLDOMNodeList *node_list;
IXMLDOMParseError *error;
IXMLDOMDocument *doc;
IUnknown *unk;
HRESULT hr;
......@@ -10663,6 +10664,14 @@ static void test_dispex(void)
IUnknown_Release(unk);
IXMLDOMNodeList_Release(node_list);
/* IXMLDOMParseError */
hr = IXMLDOMDocument_get_parseError(doc, &error);
EXPECT_HR(hr, S_OK);
IXMLDOMParseError_QueryInterface(error, &IID_IUnknown, (void**)&unk);
test_domobj_dispex(unk);
IUnknown_Release(unk);
IXMLDOMParseError_Release(error);
IXMLDOMDocument_Release(doc);
free_bstrs();
}
......
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