mshtml: Added IDispatchEx support to HTMLDOMAttribute object.
This commit is contained in:
parent
0e3bf9b228
commit
17736769c4
|
@ -48,6 +48,8 @@ static HRESULT WINAPI HTMLDOMAttribute_QueryInterface(IHTMLDOMAttribute *iface,
|
|||
}else if(IsEqualGUID(&IID_IHTMLDOMAttribute, riid)) {
|
||||
TRACE("(%p)->(IID_IHTMLDOMAttribute %p)\n", This, ppv);
|
||||
*ppv = &This->IHTMLDOMAttribute_iface;
|
||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||
return *ppv ? S_OK : E_NOINTERFACE;
|
||||
}else {
|
||||
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
|
@ -77,6 +79,7 @@ static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface)
|
|||
|
||||
if(!ref) {
|
||||
nsIDOMAttr_Release(This->nsattr);
|
||||
release_dispex(&This->dispex);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
|
@ -86,16 +89,14 @@ static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface)
|
|||
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount(IHTMLDOMAttribute *iface, UINT *pctinfo)
|
||||
{
|
||||
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfo(IHTMLDOMAttribute *iface, UINT iTInfo,
|
||||
LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDOMAttribute_GetIDsOfNames(IHTMLDOMAttribute *iface, REFIID riid,
|
||||
|
@ -103,8 +104,8 @@ static HRESULT WINAPI HTMLDOMAttribute_GetIDsOfNames(IHTMLDOMAttribute *iface, R
|
|||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDOMAttribute_Invoke(IHTMLDOMAttribute *iface, DISPID dispIdMember,
|
||||
|
@ -112,8 +113,8 @@ static HRESULT WINAPI HTMLDOMAttribute_Invoke(IHTMLDOMAttribute *iface, DISPID d
|
|||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
|
||||
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDOMAttribute_get_nodeName(IHTMLDOMAttribute *iface, BSTR *p)
|
||||
|
@ -158,6 +159,17 @@ static const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl = {
|
|||
HTMLDOMAttribute_get_specified
|
||||
};
|
||||
|
||||
static const tid_t HTMLDOMAttribute_iface_tids[] = {
|
||||
IHTMLDOMAttribute_tid,
|
||||
0
|
||||
};
|
||||
static dispex_static_data_t HTMLDOMAttribute_dispex = {
|
||||
NULL,
|
||||
DispHTMLDOMAttribute_tid,
|
||||
0,
|
||||
HTMLDOMAttribute_iface_tids
|
||||
};
|
||||
|
||||
HRESULT HTMLDOMAttribute_Create(HTMLDocumentNode *doc, nsIDOMAttr *nsattr, HTMLDOMAttribute **attr)
|
||||
{
|
||||
HTMLDOMAttribute *ret;
|
||||
|
@ -172,6 +184,9 @@ HRESULT HTMLDOMAttribute_Create(HTMLDocumentNode *doc, nsIDOMAttr *nsattr, HTMLD
|
|||
nsIDOMAttr_AddRef(nsattr);
|
||||
ret->nsattr = nsattr;
|
||||
|
||||
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMAttribute_iface,
|
||||
&HTMLDOMAttribute_dispex);
|
||||
|
||||
*attr = ret;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ typedef struct event_target_t event_target_t;
|
|||
XDIID(DispHTMLCommentElement) \
|
||||
XDIID(DispHTMLCurrentStyle) \
|
||||
XDIID(DispHTMLDocument) \
|
||||
XDIID(DispHTMLDOMAttribute) \
|
||||
XDIID(DispHTMLDOMTextNode) \
|
||||
XDIID(DispHTMLElementCollection) \
|
||||
XDIID(DispHTMLEmbed) \
|
||||
|
@ -111,6 +112,7 @@ typedef struct event_target_t event_target_t;
|
|||
XIID(IHTMLDocument3) \
|
||||
XIID(IHTMLDocument4) \
|
||||
XIID(IHTMLDocument5) \
|
||||
XIID(IHTMLDOMAttribute) \
|
||||
XIID(IHTMLDOMChildrenCollection) \
|
||||
XIID(IHTMLDOMNode) \
|
||||
XIID(IHTMLDOMNode2) \
|
||||
|
@ -740,6 +742,7 @@ HRESULT create_nselem(HTMLDocumentNode*,const WCHAR*,nsIDOMHTMLElement**);
|
|||
HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
IHTMLDOMAttribute IHTMLDOMAttribute_iface;
|
||||
|
||||
LONG ref;
|
||||
|
|
Loading…
Reference in New Issue