mshtml: Added IDispatchEx support to HTMLOptionElementFactory object.
This commit is contained in:
parent
b54a9c662a
commit
d06d73c136
|
@ -374,6 +374,8 @@ static HRESULT WINAPI HTMLOptionElementFactory_QueryInterface(IHTMLOptionElement
|
|||
*ppv = &This->IHTMLOptionElementFactory_iface;
|
||||
}else if(IsEqualGUID(&IID_IHTMLOptionElementFactory, riid)) {
|
||||
*ppv = &This->IHTMLOptionElementFactory_iface;
|
||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||
return *ppv ? S_OK : E_NOINTERFACE;
|
||||
}else {
|
||||
*ppv = NULL;
|
||||
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
|
||||
|
@ -401,8 +403,10 @@ static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *
|
|||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref)
|
||||
if(!ref) {
|
||||
release_dispex(&This->dispex);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
@ -410,16 +414,14 @@ static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *
|
|||
static HRESULT WINAPI HTMLOptionElementFactory_GetTypeInfoCount(IHTMLOptionElementFactory *iface, UINT *pctinfo)
|
||||
{
|
||||
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pctinfo);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLOptionElementFactory_GetTypeInfo(IHTMLOptionElementFactory *iface, UINT iTInfo,
|
||||
LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
|
||||
FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLOptionElementFactory_GetIDsOfNames(IHTMLOptionElementFactory *iface, REFIID riid,
|
||||
|
@ -427,9 +429,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_GetIDsOfNames(IHTMLOptionElementF
|
|||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
|
||||
FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLOptionElementFactory_Invoke(IHTMLOptionElementFactory *iface, DISPID dispIdMember,
|
||||
|
@ -437,9 +437,8 @@ static HRESULT WINAPI HTMLOptionElementFactory_Invoke(IHTMLOptionElementFactory
|
|||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
|
||||
FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams,
|
||||
pVarResult, pExcepInfo, puArgErr);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory *iface,
|
||||
|
@ -505,6 +504,18 @@ static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl = {
|
|||
HTMLOptionElementFactory_create
|
||||
};
|
||||
|
||||
static const tid_t HTMLOptionElementFactory_iface_tids[] = {
|
||||
IHTMLOptionElementFactory_tid,
|
||||
0
|
||||
};
|
||||
|
||||
static dispex_static_data_t HTMLOptionElementFactory_dispex = {
|
||||
NULL,
|
||||
IHTMLOptionElementFactory_tid,
|
||||
NULL,
|
||||
HTMLOptionElementFactory_iface_tids
|
||||
};
|
||||
|
||||
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr)
|
||||
{
|
||||
HTMLOptionElementFactory *ret;
|
||||
|
@ -517,6 +528,9 @@ HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionEleme
|
|||
ret->ref = 1;
|
||||
ret->window = window;
|
||||
|
||||
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLOptionElementFactory_iface,
|
||||
&HTMLOptionElementFactory_dispex);
|
||||
|
||||
*ret_ptr = ret;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -167,6 +167,7 @@ typedef struct event_target_t event_target_t;
|
|||
XIID(IHTMLObjectElement) \
|
||||
XIID(IHTMLObjectElement2) \
|
||||
XIID(IHTMLOptionElement) \
|
||||
XIID(IHTMLOptionElementFactory) \
|
||||
XIID(IHTMLPluginsCollection) \
|
||||
XIID(IHTMLRect) \
|
||||
XIID(IHTMLScreen) \
|
||||
|
@ -318,6 +319,7 @@ typedef struct {
|
|||
} global_prop_t;
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
IHTMLOptionElementFactory IHTMLOptionElementFactory_iface;
|
||||
|
||||
LONG ref;
|
||||
|
|
|
@ -1741,6 +1741,8 @@ static IHTMLOptionElement *_create_option_elem(unsigned line, IHTMLDocument2 *do
|
|||
IHTMLWindow2_Release(window);
|
||||
ok_(__FILE__,line) (hres == S_OK, "get_Option failed: %08x\n", hres);
|
||||
|
||||
test_disp((IUnknown*)factory, &IID_IHTMLOptionElementFactory, "[object]");
|
||||
|
||||
V_VT(&text) = VT_BSTR;
|
||||
V_BSTR(&text) = a2bstr(txt);
|
||||
V_VT(&value) = VT_BSTR;
|
||||
|
|
Loading…
Reference in New Issue