diff --git a/dlls/msxml3/queryresult.c b/dlls/msxml3/queryresult.c index f30172da3d2..56c1a537674 100644 --- a/dlls/msxml3/queryresult.c +++ b/dlls/msxml3/queryresult.c @@ -65,6 +65,8 @@ static inline queryresult *impl_from_IXMLDOMNodeList( IXMLDOMNodeList *iface ) return (queryresult *)((char*)iface - FIELD_OFFSET(queryresult, lpVtbl)); } +#define XMLQUERYRES(x) ((IXMLDOMNodeList*)&(x)->lpVtbl) + static HRESULT WINAPI queryresult_QueryInterface( IXMLDOMNodeList *iface, REFIID riid, @@ -326,13 +328,28 @@ static HRESULT queryresult_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fl { queryresult *This = impl_from_IXMLDOMNodeList( (IXMLDOMNodeList*)iface ); - if(flags != DISPATCH_PROPERTYGET) { - FIXME("flags %x\n", flags); - return E_NOTIMPL; - } + TRACE("(%p)->(%x %x %x %p %p %p)\n", This, id, lcid, flags, params, res, ei); V_VT(res) = VT_DISPATCH; - V_DISPATCH(res) = (IDispatch*)create_node(This->result->nodesetval->nodeTab[This->resultPos]); + V_DISPATCH(res) = NULL; + + switch(flags) + { + case INVOKE_PROPERTYGET: + { + IXMLDOMNode *disp = NULL; + + queryresult_get_item(XMLQUERYRES(This), id - MSXML_DISPID_CUSTOM_MIN, &disp); + V_DISPATCH(res) = (IDispatch*)&disp; + break; + } + default: + { + FIXME("unimplemented flags %x\n", flags); + break; + } + } + return S_OK; }