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