diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 26be1e8e7e0..e42649c5a8a 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -52,11 +52,15 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list); static REFIID tid_ids[] = { &IID_NULL, &DIID_DispHTMLDocument, + &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, &IID_IHTMLDocument3, &IID_IHTMLDocument4, &IID_IHTMLDocument5, + &IID_IHTMLDOMNode, + &IID_IHTMLElement, + &IID_IHTMLElement2, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 87778702f84..748faf61292 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1282,6 +1282,17 @@ static const NodeImplVtbl HTMLElementImplVtbl = { HTMLElement_destructor }; +static dispex_static_data_t HTMLElement_dispex = { + DispHTMLUnknownElement_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + 0 + } +}; + void HTMLElement_Init(HTMLElement *This) { This->node.vtbl = &HTMLElementImplVtbl; @@ -1344,6 +1355,9 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode) ret->nselem = nselem; + if(!ret->node.dispex.data) + init_dispex(&ret->node.dispex, (IUnknown*)HTMLELEM(ret), &HTMLElement_dispex); + return ret; } diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index f0094112323..d3a9b723db9 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -313,6 +313,14 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IDispatch, riid)) { TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); *ppv = HTMLDOMNODE(This); + }else if(IsEqualGUID(&IID_IDispatchEx, riid)) { + if(This->dispex.data) { + TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + *ppv = DISPATCHEX(&This->dispex); + }else { + FIXME("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + return E_NOINTERFACE; + } }else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) { TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv); *ppv = HTMLDOMNODE(This); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 73169f746d3..5fb37dafbd2 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -62,11 +62,15 @@ typedef struct event_target_t event_target_t; typedef enum { NULL_tid, DispHTMLDocument_tid, + DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, IHTMLDocument3_tid, IHTMLDocument4_tid, IHTMLDocument5_tid, + IHTMLDOMNode_tid, + IHTMLElement_tid, + IHTMLElement2_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid, @@ -293,6 +297,7 @@ typedef struct { } NodeImplVtbl; struct HTMLDOMNode { + DispatchEx dispex; const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl; const NodeImplVtbl *vtbl;