From 64683549b0919e1608e4c2477220827883b4707a Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 21 Feb 2008 20:24:32 +1100 Subject: [PATCH] msxml3: Implement IDispatch for IXMLDOMNodeList. --- dlls/msxml3/nodelist.c | 57 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/dlls/msxml3/nodelist.c b/dlls/msxml3/nodelist.c index 9b1aa904833..79bc71074e5 100644 --- a/dlls/msxml3/nodelist.c +++ b/dlls/msxml3/nodelist.c @@ -111,8 +111,13 @@ static HRESULT WINAPI xmlnodelist_GetTypeInfoCount( IXMLDOMNodeList *iface, UINT* pctinfo ) { - FIXME("\n"); - return E_NOTIMPL; + xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); + + TRACE("(%p)->(%p)\n", This, pctinfo); + + *pctinfo = 1; + + return S_OK; } static HRESULT WINAPI xmlnodelist_GetTypeInfo( @@ -121,8 +126,14 @@ static HRESULT WINAPI xmlnodelist_GetTypeInfo( LCID lcid, ITypeInfo** ppTInfo ) { - FIXME("\n"); - return E_NOTIMPL; + xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); + HRESULT hr; + + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + + hr = get_typeinfo(IXMLDOMNodeList_tid, ppTInfo); + + return hr; } static HRESULT WINAPI xmlnodelist_GetIDsOfNames( @@ -133,8 +144,24 @@ static HRESULT WINAPI xmlnodelist_GetIDsOfNames( LCID lcid, DISPID* rgDispId ) { - FIXME("\n"); - return E_NOTIMPL; + xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + + if(!rgszNames || cNames == 0 || !rgDispId) + return E_INVALIDARG; + + hr = get_typeinfo(IXMLDOMNodeList_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI xmlnodelist_Invoke( @@ -148,8 +175,22 @@ static HRESULT WINAPI xmlnodelist_Invoke( EXCEPINFO* pExcepInfo, UINT* puArgErr ) { - FIXME("\n"); - return E_NOTIMPL; + xmlnodelist *This = impl_from_IXMLDOMNodeList( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + hr = get_typeinfo(IXMLDOMNodeList_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, + pVarResult, pExcepInfo, puArgErr); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI xmlnodelist_get_item(