Re: msxml3: Add IDispatchEx support to IXMLDOMElement (resend 2)

2009-09-09 Thread Alexandre Julliard
Alistair Leslie-Hughes  writes:

> Hi,
>  Feedback if something is wrong would be great.

domdoc.c:601: warning: ISO C90 forbids mixed declarations and code

-- 
Alexandre Julliard
julli...@winehq.org




Re: msxml3: Add IDispatchEx support to IXMLDOMElement

2009-08-31 Thread Jacek Caban

Hi Alistair,

Alistair Leslie-Hughes wrote:

Hi,


Changelog:
msxml3: Add IDispatchEx support to IXMLDOMElement


+static const tid_t domelem_iface_tids[] = {
+IXMLDOMNode_tid,
+IXMLDOMElement_tid,


IXMLDOMElement inherits from IXMLDOMNode, so there is not need to add 
IXMLDOMNode here.


Jacek





Re: [2/2] msxml3: Add IDispatchEx support to IXMLDOMElement

2009-08-20 Thread Jacek Caban

Hi Alistair,

Alistair Leslie-Hughes wrote:

Hi,


Changelog:
msxml3: Add IDispatchEx support to IXMLDOMElement



+else if( IsEqualGUID( riid, &IID_IDispatch ) ||
+ IsEqualGUID( riid, &IID_IDispatchEx ) )
+{
+xmlnode *node = impl_from_IXMLDOMNode( This->node );
+
+dispex_query_interface(&node->dispex, riid, ppvObject);
+
+return *ppvObject ? S_OK : E_NOINTERFACE;
+}


This should be handled by node's QueryInterface implementation.

+
+xmlnode = impl_from_IXMLDOMNode( This->node );


It's not about your code as you follow msxml3 design, but this is ugly 
and it shouldn't be needed.


+init_dispex(&xmlnode->dispex, (IUnknown*)&This->lpVtbl, &domelem_dispex);


init_dispex is first called in create_basic_node, so you initialize it 
second time here.



IMO msxml3 object inheritance needs serious design changes and it would 
be better to do it before adding IDispatchEx support for node 
implementations. I will send a few first patches.



Thanks,
   Jacek




Re: [1/2] msxml3: Add IDispatchEx support to IXMLDOMElement

2009-08-12 Thread Jacek Caban

Alistair Leslie-Hughes wrote:

Hi,


Changelog:
msxml3: Add IDispatchEx support to IXMLDOMElement


@@ -46,6 +47,9 @@ typedef struct _domelem
LONG ref;
IUnknown *node_unk;
IXMLDOMNode *node;
+
+/* IDispatchEx */

+DispatchEx dispex;
} domelem;



It would be probably better to add DispatchEx to node object. Then other 
node types will reuse it (initializing with different data). See how 
it's done in mshtml.



Jacek