diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 6590e5baed5..531d43eea26 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -74,6 +74,10 @@ static HRESULT WINAPI domelem_QueryInterface( { *ppvObject = IXMLDOMNode_from_impl(This->node); } + else if(dispex_query_interface(&This->node->dispex, riid, ppvObject)) + { + return *ppvObject ? S_OK : E_NOINTERFACE; + } else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); @@ -751,6 +755,18 @@ static const struct IXMLDOMElementVtbl domelem_vtbl = domelem_normalize, }; +static const tid_t domelem_iface_tids[] = { + IXMLDOMElement_tid, + 0 +}; + +static dispex_static_data_t domelem_dispex = { + NULL, + IXMLDOMElement_tid, + NULL, + domelem_iface_tids +}; + IUnknown* create_element( xmlNodePtr element ) { domelem *This; @@ -762,7 +778,7 @@ IUnknown* create_element( xmlNodePtr element ) This->lpVtbl = &domelem_vtbl; This->ref = 1; - This->node = create_basic_node( element, (IUnknown*)&This->lpVtbl, NULL ); + This->node = create_basic_node( element, (IUnknown*)&This->lpVtbl, &domelem_dispex ); if(!This->node) { HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 91e34f50a35..469a4f94492 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -599,6 +599,8 @@ static void test_domdoc( void ) IObjectIdentity *ident; BSTR tag = NULL; + test_disp((IUnknown*)element); + r = IXMLDOMElement_QueryInterface( element, &IID_IObjectIdentity, (LPVOID*)&ident ); ok( r == E_NOINTERFACE, "ret %08x\n", r);