[PATCH] Implemented IDispatch for IXMLDocument
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Mon Feb 18 19:36:53 CST 2008
---
dlls/msxml3/xmldoc.c | 57 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
index ee72d1b..d157a86 100644
--- a/dlls/msxml3/xmldoc.c
+++ b/dlls/msxml3/xmldoc.c
@@ -126,23 +126,50 @@ static ULONG WINAPI xmldoc_Release(IXMLDocument *iface)
static HRESULT WINAPI xmldoc_GetTypeInfoCount(IXMLDocument *iface, UINT* pctinfo)
{
- FIXME("\n");
- return E_NOTIMPL;
+ xmldoc *This = impl_from_IXMLDocument(iface);
+
+ TRACE("(%p)->(%p)\n", This, pctinfo);
+
+ *pctinfo = 1;
+
+ return S_OK;
}
static HRESULT WINAPI xmldoc_GetTypeInfo(IXMLDocument *iface, UINT iTInfo,
LCID lcid, ITypeInfo** ppTInfo)
{
- FIXME("\n");
- return E_NOTIMPL;
+ xmldoc *This = impl_from_IXMLDocument(iface);
+ HRESULT hr;
+
+ TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+
+ hr = get_typeinfo(IXMLDocument_tid, ppTInfo);
+
+ return hr;
}
static HRESULT WINAPI xmldoc_GetIDsOfNames(IXMLDocument *iface, REFIID riid,
LPOLESTR* rgszNames, UINT cNames,
LCID lcid, DISPID* rgDispId)
{
- FIXME("\n");
- return E_NOTIMPL;
+ xmldoc *This = impl_from_IXMLDocument(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(IXMLDocument_tid, &typeinfo);
+ if(SUCCEEDED(hr))
+ {
+ hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
+ ITypeInfo_Release(typeinfo);
+ }
+
+ return hr;
}
static HRESULT WINAPI xmldoc_Invoke(IXMLDocument *iface, DISPID dispIdMember,
@@ -150,8 +177,22 @@ static HRESULT WINAPI xmldoc_Invoke(IXMLDocument *iface, DISPID dispIdMember,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
- FIXME("\n");
- return E_NOTIMPL;
+ xmldoc *This = impl_from_IXMLDocument(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(IXMLDocument_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 xmldoc_get_root(IXMLDocument *iface, IXMLElement **p)
--
1.5.3.8
--------------030203050300090103020909--
More information about the wine-patches
mailing list