Jacek Caban (@jacek) commented about dlls/mshtml/dispex.c:
{ DispatchEx *This = impl_from_IDispatchEx(iface);
- return IUnknown_QueryInterface(This->outer, riid, ppv);
- if(This->outer)
return IUnknown_QueryInterface(This->outer, riid, ppv);
- TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
- if(This->info->desc->vtbl->query_interface) {
You could just call it from `dispex_query_interface` and keep outer pointer valid for now. This should simplify the transition and avoid all those `if(This->outer)` branches. Once all objects' QueryInterface implementations simply forward to `dispex_query_interface`, it will be easier to switch.