diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index 823234f7ca9..5607a034e05 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -293,7 +293,10 @@ static HRESULT WINAPI domattr_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI domattr_insertBefore( diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index e53785859bf..98e77c5c783 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -303,8 +303,11 @@ static HRESULT WINAPI domcdata_get_attributes( IXMLDOMCDATASection *iface, IXMLDOMNamedNodeMap** attributeMap) { - domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + domcdata *This = impl_from_IXMLDOMCDATASection( iface ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI domcdata_insertBefore( diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index bc53dde0307..dee94b2b059 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -297,7 +297,10 @@ static HRESULT WINAPI domcomment_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { domcomment *This = impl_from_IXMLDOMComment( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI domcomment_insertBefore( diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 9c6c903198a..0c1b9ae530f 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -299,7 +299,10 @@ static HRESULT WINAPI domfrag_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI domfrag_insertBefore( diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 3e1cf9057cb..fbdc280b159 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -812,7 +812,10 @@ static HRESULT WINAPI domdoc_get_attributes( IXMLDOMNamedNodeMap** attributeMap ) { domdoc *This = impl_from_IXMLDOMDocument3( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 798372015de..1081ed42119 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -308,7 +308,11 @@ static HRESULT WINAPI domelem_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { domelem *This = impl_from_IXMLDOMElement( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + *attributeMap = create_nodemap((IXMLDOMNode*)&This->lpVtbl); + return S_OK; } static HRESULT WINAPI domelem_insertBefore( diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index 8598cdfd815..cf0b8003c80 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -295,7 +295,10 @@ static HRESULT WINAPI entityref_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI entityref_insertBefore( diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 901a37434f9..211300e2f43 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -212,6 +212,14 @@ static inline HRESULT return_null_node(IXMLDOMNode **p) return S_FALSE; } +static inline HRESULT return_null_ptr(void **p) +{ + if(!p) + return E_INVALIDARG; + *p = NULL; + return S_FALSE; +} + #endif void* libxslt_handle; diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index f72d0641a86..5d257612505 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -369,30 +369,8 @@ static HRESULT WINAPI xmlnode_get_attributes( IXMLDOMNode *iface, IXMLDOMNamedNodeMap** attributeMap) { - xmlnode *This = impl_from_IXMLDOMNode( iface ); - TRACE("(%p)->(%p)\n", This, attributeMap); - - if (!attributeMap) - return E_INVALIDARG; - - switch( This->node->type ) - { - /* Attribute, CDataSection, Comment, Documents, Documents Fragments, - Entity and Text Nodes does not support get_attributes */ - case XML_ATTRIBUTE_NODE: - case XML_CDATA_SECTION_NODE: - case XML_COMMENT_NODE: - case XML_DOCUMENT_NODE: - case XML_DOCUMENT_FRAG_NODE: - case XML_ENTITY_NODE: - case XML_ENTITY_REF_NODE: - case XML_TEXT_NODE: - *attributeMap = NULL; - return S_FALSE; - default: - *attributeMap = create_nodemap( This->iface ); - return S_OK; - } + ERR("Should not be called\n"); + return E_NOTIMPL; } static HRESULT WINAPI xmlnode_insertBefore( @@ -1852,7 +1830,10 @@ static HRESULT WINAPI unknode_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { unknode *This = impl_from_unkIXMLDOMNode( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + FIXME("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI unknode_insertBefore( diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index a42c2d7794c..446b1a78f3c 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -310,7 +310,11 @@ static HRESULT WINAPI dom_pi_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + *attributeMap = create_nodemap((IXMLDOMNode*)&This->lpVtbl); + return S_OK; } static HRESULT WINAPI dom_pi_insertBefore( diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c index 3ce91907ea6..b236c547754 100644 --- a/dlls/msxml3/text.c +++ b/dlls/msxml3/text.c @@ -310,7 +310,10 @@ static HRESULT WINAPI domtext_get_attributes( IXMLDOMNamedNodeMap** attributeMap) { domtext *This = impl_from_IXMLDOMText( iface ); - return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap ); + + TRACE("(%p)->(%p)\n", This, attributeMap); + + return return_null_ptr((void**)attributeMap); } static HRESULT WINAPI domtext_insertBefore(