Commit 8b8e91a5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for DISPID_VALUE.

parent 7a56aca2
...@@ -407,6 +407,29 @@ HRESULT dispex_get_dprop_ref(DispatchEx *This, const WCHAR *name, BOOL alloc, VA ...@@ -407,6 +407,29 @@ HRESULT dispex_get_dprop_ref(DispatchEx *This, const WCHAR *name, BOOL alloc, VA
return S_OK; return S_OK;
} }
static HRESULT dispex_value(DispatchEx *This, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
static const WCHAR objectW[] = {'[','o','b','j','e','c','t',']',0};
if(This->data->vtbl && This->data->vtbl->value)
return This->data->vtbl->value(This->outer, lcid, flags, params, res, ei, caller);
switch(flags) {
case DISPATCH_PROPERTYGET:
V_VT(res) = VT_BSTR;
V_BSTR(res) = SysAllocString(objectW);
if(!V_BSTR(res))
return E_OUTOFMEMORY;
break;
default:
FIXME("Unimplemented flags %x\n", flags);
return E_NOTIMPL;
}
return S_OK;
}
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface) #define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
...@@ -556,6 +579,9 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc ...@@ -556,6 +579,9 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(id == DISPID_VALUE)
return dispex_value(This, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke) if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke)
return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
......
...@@ -428,6 +428,7 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { ...@@ -428,6 +428,7 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = {
}; };
static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = {
NULL,
HTMLElementCollection_get_dispid, HTMLElementCollection_get_dispid,
HTMLElementCollection_invoke HTMLElementCollection_invoke
}; };
......
...@@ -250,6 +250,7 @@ static const tid_t HTMLDOMChildrenCollection_iface_tids[] = { ...@@ -250,6 +250,7 @@ static const tid_t HTMLDOMChildrenCollection_iface_tids[] = {
}; };
static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl = { static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl = {
NULL,
HTMLDOMChildrenCollection_get_dispid, HTMLDOMChildrenCollection_get_dispid,
HTMLDOMChildrenCollection_invoke HTMLDOMChildrenCollection_invoke
}; };
......
...@@ -2610,6 +2610,7 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = { ...@@ -2610,6 +2610,7 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = {
}; };
static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = { static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
NULL,
HTMLStyle_get_dispid, HTMLStyle_get_dispid,
NULL NULL
}; };
......
...@@ -127,6 +127,7 @@ typedef struct dispex_dynamic_data_t dispex_dynamic_data_t; ...@@ -127,6 +127,7 @@ typedef struct dispex_dynamic_data_t dispex_dynamic_data_t;
#define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff #define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff
typedef struct { typedef struct {
HRESULT (*value)(IUnknown*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*get_dispid)(IUnknown*,BSTR,DWORD,DISPID*); HRESULT (*get_dispid)(IUnknown*,BSTR,DWORD,DISPID*);
HRESULT (*invoke)(IUnknown*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); HRESULT (*invoke)(IUnknown*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
} dispex_static_data_vtbl_t; } dispex_static_data_vtbl_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment