Module: wine Branch: master Commit: 5996de5c2e5b8f1b27aa345714cb9dca401333d8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5996de5c2e5b8f1b27aa345714...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Feb 24 15:21:14 2016 +0100
mshtml: Added HTMLXMLHttpRequestFactory DISPID_VALUE implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/xmlhttprequest.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index d188478..ba6dc05 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -828,12 +828,44 @@ static const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl = { HTMLXMLHttpRequestFactory_create };
+static inline HTMLXMLHttpRequestFactory *factory_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLXMLHttpRequestFactory, dispex); +} + +static HRESULT HTMLXMLHttpRequestFactory_value(DispatchEx *iface, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + HTMLXMLHttpRequestFactory *This = factory_from_DispatchEx(iface); + IHTMLXMLHttpRequest *xhr; + HRESULT hres; + + TRACE("\n"); + + if(flags != DISPATCH_CONSTRUCT) { + FIXME("flags %x not supported\n", flags); + return E_NOTIMPL; + } + + hres = IHTMLXMLHttpRequestFactory_create(&This->IHTMLXMLHttpRequestFactory_iface, &xhr); + if(FAILED(hres)) + return hres; + + V_VT(res) = VT_DISPATCH; + V_DISPATCH(res) = (IDispatch*)xhr; + return S_OK; +} + +static const dispex_static_data_vtbl_t HTMLXMLHttpRequestFactory_dispex_vtbl = { + HTMLXMLHttpRequestFactory_value +}; + static const tid_t HTMLXMLHttpRequestFactory_iface_tids[] = { IHTMLXMLHttpRequestFactory_tid, 0 }; static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex = { - NULL, + &HTMLXMLHttpRequestFactory_dispex_vtbl, IHTMLXMLHttpRequestFactory_tid, NULL, HTMLXMLHttpRequestFactory_iface_tids