mshtml: Added HTMLAttributeCollection_invoke implementation.

This commit is contained in:
Piotr Caban 2011-09-02 14:17:49 +02:00 committed by Alexandre Julliard
parent fb9af4648f
commit 648ed1e1c6
1 changed files with 28 additions and 4 deletions

View File

@ -2622,12 +2622,36 @@ static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, BSTR name,
return S_OK;
}
static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
FIXME("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
return E_NOTIMPL;
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
switch(flags) {
case DISPATCH_PROPERTYGET: {
HTMLDOMAttribute *iter;
id = id-MSHTML_DISPID_CUSTOM_MIN+1;
LIST_FOR_EACH_ENTRY(iter, &This->attrs, HTMLDOMAttribute, entry) {
if(!(--id))
break;
}
if(id)
return E_INVALIDARG;
IHTMLDOMAttribute_AddRef(&iter->IHTMLDOMAttribute_iface);
V_VT(res) = VT_DISPATCH;
V_DISPATCH(res) = (IDispatch*)&iter->IHTMLDOMAttribute_iface;
return S_OK;
}
default:
FIXME("unimplemented flags %x\n", flags);
return E_NOTIMPL;
}
}
static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = {