msxml3: Correct IDispatchEx Invoke to return the correct object.

This commit is contained in:
Alistair Leslie-Hughes 2008-09-17 20:14:24 +10:00 committed by Alexandre Julliard
parent 977b7d398e
commit b64b5ea5ea
1 changed files with 22 additions and 5 deletions

View File

@ -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;
}