From f02505ebfb1968e5cf88f6791faa6759e438c5e4 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 19 Feb 2008 11:53:20 +1100 Subject: [PATCH] msxml3: Implemented IDispatch for IXMLDOMDocumentFragment. --- dlls/msxml3/docfrag.c | 57 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 549e9e4da41..f922faaa229 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -106,8 +106,13 @@ static HRESULT WINAPI domfrag_GetTypeInfoCount( IXMLDOMDocumentFragment *iface, UINT* pctinfo ) { - FIXME("\n"); - return E_NOTIMPL; + domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); + + TRACE("(%p)->(%p)\n", This, pctinfo); + + *pctinfo = 1; + + return S_OK; } static HRESULT WINAPI domfrag_GetTypeInfo( @@ -115,8 +120,14 @@ static HRESULT WINAPI domfrag_GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo ) { - FIXME("\n"); - return E_NOTIMPL; + domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); + HRESULT hr; + + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + + hr = get_typeinfo(IXMLDOMDocumentFragment_tid, ppTInfo); + + return hr; } static HRESULT WINAPI domfrag_GetIDsOfNames( @@ -124,8 +135,24 @@ static HRESULT WINAPI domfrag_GetIDsOfNames( REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId ) { - FIXME("\n"); - return E_NOTIMPL; + domfrag *This = impl_from_IXMLDOMDocumentFragment( 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(IXMLDOMDocumentFragment_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI domfrag_Invoke( @@ -134,8 +161,22 @@ static HRESULT WINAPI domfrag_Invoke( WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr ) { - FIXME("\n"); - return E_NOTIMPL; + domfrag *This = impl_from_IXMLDOMDocumentFragment( 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(IXMLDOMDocumentFragment_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 domfrag_get_nodeName(