Jacek Caban (@jacek) commented about dlls/mshtml/htmlwindow.c:
- if(FAILED(hres))
return hres;
- hres = IDispatchEx_InvokeEx(&location->dispex.IDispatchEx_iface, DISPID_VALUE, 0, flags, dp, res, ei, caller);
- IHTMLLocation_Release(&location->IHTMLLocation_iface);
- return hres;
+}
static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compat_mode) {
- static const dispex_hook_t window2_hooks[] = {
{DISPID_IHTMLWINDOW2_LOCATION, IHTMLWindow2_location_hook},
/* DispHTMLWindow2 uses these from IHTMLWindow3 */
{DISPID_IHTMLWINDOW2_SETTIMEOUT},
{DISPID_IHTMLWINDOW2_SETINTERVAL},
{DISPID_UNKNOWN}
You can achieve this by adding interfaces in the right order, there is no need for such weird constructs.
For location and setTimeout themselves, it also seems possible to use the private interface, but maybe that's for another day...