Nikolay Sivov : msxml3: Added IDispatch support for IServerXMLHTTPRequest.
Alexandre Julliard
julliard at winehq.org
Mon May 21 15:31:08 CDT 2012
Module: wine
Branch: master
Commit: ec2114e66e7ec033bd8dacb06ce6e5f509b435f8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ec2114e66e7ec033bd8dacb06ce6e5f509b435f8
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat May 19 11:35:16 2012 +0400
msxml3: Added IDispatch support for IServerXMLHTTPRequest.
---
dlls/msxml3/dispex.c | 3 ++-
dlls/msxml3/httprequest.c | 39 +++++++++++++++++++++++++++++++--------
dlls/msxml3/msxml_private.h | 1 +
3 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c
index 23b8805..3aafc44 100644
--- a/dlls/msxml3/dispex.c
+++ b/dlls/msxml3/dispex.c
@@ -150,7 +150,8 @@ static tid_id_t tid_ids[] = {
{ &IID_IMXAttributes, LibXml2 },
{ &IID_IMXReaderControl, LibXml2 },
{ &IID_IMXWriter, LibXml2 },
- { &IID_IVBMXNamespaceManager, LibXml2 }
+ { &IID_IVBMXNamespaceManager, LibXml2 },
+ { &IID_IServerXMLHTTPRequest, LibXml2 }
};
const IID *get_riid_from_tid(tid_t tid)
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 385908a..16e2446 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -1590,9 +1590,10 @@ static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfoCount(IServerXMLHTTPReques
{
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
- FIXME("(%p)->(%p): stub\n", This, pctinfo);
+ TRACE("(%p)->(%p)\n", This, pctinfo);
+ *pctinfo = 1;
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo(IServerXMLHTTPRequest *iface, UINT iTInfo,
@@ -1600,20 +1601,32 @@ static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo(IServerXMLHTTPRequest *if
{
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
- FIXME("(%p)->(%u %u %p): stub\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
- return E_NOTIMPL;
+ return get_typeinfo(IServerXMLHTTPRequest_tid, ppTInfo);
}
static HRESULT WINAPI ServerXMLHTTPRequest_GetIDsOfNames(IServerXMLHTTPRequest *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
+ ITypeInfo *typeinfo;
+ HRESULT hr;
- FIXME("(%p)->(%s %p %u %u %p): stub\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
- return E_NOTIMPL;
+ if(!rgszNames || cNames == 0 || !rgDispId)
+ return E_INVALIDARG;
+
+ hr = get_typeinfo(IServerXMLHTTPRequest_tid, &typeinfo);
+ if(SUCCEEDED(hr))
+ {
+ hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
+ ITypeInfo_Release(typeinfo);
+ }
+
+ return hr;
}
static HRESULT WINAPI ServerXMLHTTPRequest_Invoke(IServerXMLHTTPRequest *iface, DISPID dispIdMember, REFIID riid,
@@ -1621,11 +1634,21 @@ static HRESULT WINAPI ServerXMLHTTPRequest_Invoke(IServerXMLHTTPRequest *iface,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
+ ITypeInfo *typeinfo;
+ HRESULT hr;
- FIXME("(%p)->(%d %s %d %d %p %p %p %p): stub\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return E_NOTIMPL;
+ hr = get_typeinfo(IServerXMLHTTPRequest_tid, &typeinfo);
+ if(SUCCEEDED(hr))
+ {
+ hr = ITypeInfo_Invoke(typeinfo, &This->IServerXMLHTTPRequest_iface, dispIdMember, wFlags,
+ pDispParams, pVarResult, pExcepInfo, puArgErr);
+ ITypeInfo_Release(typeinfo);
+ }
+
+ return hr;
}
static HRESULT WINAPI ServerXMLHTTPRequest_open(IServerXMLHTTPRequest *iface, BSTR method, BSTR url,
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
index 1c58730..3a2efb0 100644
--- a/dlls/msxml3/msxml_private.h
+++ b/dlls/msxml3/msxml_private.h
@@ -80,6 +80,7 @@ typedef enum tid_t {
IMXReaderControl_tid,
IMXWriter_tid,
IVBMXNamespaceManager_tid,
+ IServerXMLHTTPRequest_tid,
LAST_tid
} tid_t;
More information about the wine-cvs
mailing list