msxml3: Added IDispatchEx support for IXMLDOMImplementation.
This commit is contained in:
parent
b6d3068c24
commit
6d4c1931f9
|
@ -44,6 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
||||||
|
|
||||||
typedef struct _domimpl
|
typedef struct _domimpl
|
||||||
{
|
{
|
||||||
|
DispatchEx dispex;
|
||||||
IXMLDOMImplementation IXMLDOMImplementation_iface;
|
IXMLDOMImplementation IXMLDOMImplementation_iface;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
} domimpl;
|
} domimpl;
|
||||||
|
@ -67,6 +68,10 @@ static HRESULT WINAPI dimimpl_QueryInterface(
|
||||||
{
|
{
|
||||||
*ppvObject = iface;
|
*ppvObject = iface;
|
||||||
}
|
}
|
||||||
|
else if (dispex_query_interface(&This->dispex, riid, ppvObject))
|
||||||
|
{
|
||||||
|
return *ppvObject ? S_OK : E_NOINTERFACE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("Unsupported interface %s\n", debugstr_guid(riid));
|
TRACE("Unsupported interface %s\n", debugstr_guid(riid));
|
||||||
|
@ -97,6 +102,7 @@ static ULONG WINAPI dimimpl_Release(
|
||||||
TRACE("(%p)->(%d)\n", This, ref);
|
TRACE("(%p)->(%d)\n", This, ref);
|
||||||
if ( ref == 0 )
|
if ( ref == 0 )
|
||||||
{
|
{
|
||||||
|
release_dispex(&This->dispex);
|
||||||
heap_free( This );
|
heap_free( This );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,13 +128,10 @@ static HRESULT WINAPI dimimpl_GetTypeInfo(
|
||||||
ITypeInfo** ppTInfo )
|
ITypeInfo** ppTInfo )
|
||||||
{
|
{
|
||||||
domimpl *This = impl_from_IXMLDOMImplementation( iface );
|
domimpl *This = impl_from_IXMLDOMImplementation( iface );
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||||
|
|
||||||
hr = get_typeinfo(IXMLDOMImplementation_tid, ppTInfo);
|
return get_typeinfo(IXMLDOMImplementation_tid, ppTInfo);
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI dimimpl_GetIDsOfNames(
|
static HRESULT WINAPI dimimpl_GetIDsOfNames(
|
||||||
|
@ -220,6 +223,18 @@ static const struct IXMLDOMImplementationVtbl dimimpl_vtbl =
|
||||||
dimimpl_hasFeature
|
dimimpl_hasFeature
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const tid_t dimimpl_iface_tids[] = {
|
||||||
|
IXMLDOMImplementation_tid,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
static dispex_static_data_t dimimpl_dispex = {
|
||||||
|
NULL,
|
||||||
|
IXMLDOMImplementation_tid,
|
||||||
|
NULL,
|
||||||
|
dimimpl_iface_tids
|
||||||
|
};
|
||||||
|
|
||||||
IUnknown* create_doc_Implementation(void)
|
IUnknown* create_doc_Implementation(void)
|
||||||
{
|
{
|
||||||
domimpl *This;
|
domimpl *This;
|
||||||
|
@ -230,6 +245,7 @@ IUnknown* create_doc_Implementation(void)
|
||||||
|
|
||||||
This->IXMLDOMImplementation_iface.lpVtbl = &dimimpl_vtbl;
|
This->IXMLDOMImplementation_iface.lpVtbl = &dimimpl_vtbl;
|
||||||
This->ref = 1;
|
This->ref = 1;
|
||||||
|
init_dispex(&This->dispex, (IUnknown*)&This->IXMLDOMImplementation_iface, &dimimpl_dispex);
|
||||||
|
|
||||||
return (IUnknown*)&This->IXMLDOMImplementation_iface;
|
return (IUnknown*)&This->IXMLDOMImplementation_iface;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10507,6 +10507,7 @@ static const DOMNodeType dispex_types_test[] =
|
||||||
static void test_dispex(void)
|
static void test_dispex(void)
|
||||||
{
|
{
|
||||||
const DOMNodeType *type = dispex_types_test;
|
const DOMNodeType *type = dispex_types_test;
|
||||||
|
IXMLDOMImplementation *impl;
|
||||||
IXMLDOMNodeList *node_list;
|
IXMLDOMNodeList *node_list;
|
||||||
IXMLDOMParseError *error;
|
IXMLDOMParseError *error;
|
||||||
IXMLDOMNamedNodeMap *map;
|
IXMLDOMNamedNodeMap *map;
|
||||||
|
@ -10612,6 +10613,15 @@ static void test_dispex(void)
|
||||||
IXMLDOMNamedNodeMap_Release(map);
|
IXMLDOMNamedNodeMap_Release(map);
|
||||||
IXMLDOMElement_Release(elem);
|
IXMLDOMElement_Release(elem);
|
||||||
|
|
||||||
|
/* IXMLDOMImplementation */
|
||||||
|
hr = IXMLDOMDocument_get_implementation(doc, &impl);
|
||||||
|
EXPECT_HR(hr, S_OK);
|
||||||
|
|
||||||
|
hr = IXMLDOMImplementation_QueryInterface(impl, &IID_IDispatchEx, (void**)&dispex);
|
||||||
|
EXPECT_HR(hr, S_OK);
|
||||||
|
IDispatchEx_Release(dispex);
|
||||||
|
IXMLDOMImplementation_Release(impl);
|
||||||
|
|
||||||
IXMLDOMDocument_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
|
||||||
/* IXMLHTTPRequest */
|
/* IXMLHTTPRequest */
|
||||||
|
|
Loading…
Reference in New Issue