Gabriel Ivăncescu (@insn) commented about dlls/mshtml/mutation.c:
if(NS_FAILED(nsres)) ERR("Could not create nsIContentUtils instance: %08lx\n", nsres);
}
+struct mutation_observer {
- IWineMSHTMLMutationObserver IWineMSHTMLMutationObserver_iface;
- LONG ref;
- DispatchEx dispex;
- IDispatch *callback;
- HTMLDOMNode *node;
+};
Ok so I will comment in general here for the entire thing. First name it `mutation_observer_ctor` or something like that to make it known it's a constructor and **not** the instance created from it.
Secondly, this is not a DOM node (and anyway what you did was wrong and you didn't even make use of it), so you can simply remove the entire node thing.
For an example of constructors you can look at e.g. `HTMLXMLHttpRequestFactory`. You just need the dispex, a ref and probably an IUnknown iface to implement it (and the dispex qi). IUnknown because I don't think this constructor exposes any props or methods… (IUnknown instead of your IWineMSHTMLMutationObserver basically, since that's for the _instance_ not the constructor).
If you make it IUnknown you'll have to return the dispex's IDispatchEx iface when returning the constructor as an IDispatch, obviously. This will avoid having to add forwarding methods like GetIDsOfNames and so on.
If you want to actually implement construction you'll have to use the dispex vtbl's value (see the other constructors like XMLHttpRequestFactory) but you can set that aside for now since you just expose it as stub.