On Thu Jun 6 15:55:43 2024 +0000, Gabriel Ivăncescu wrote:
Actually you don't even need to query IID anymore. Just look up the function by dispid, and then check if it's same func_info_t, that's enough.
BTW, is there a reason you renamed `IWineJSDispatchHost` to just `IJSDispatchHost` when it's Wine's own interface? I thought it's better to avoid ambiguity with a native interface, especially if we're to extend it (obviously we can't touch native interfaces), makes it a lot more obvious.
And to add to what I said above, what I meant with "retrieving a potentially different function" is mostly theoretical, because as you said current mshtml likely has only one struct layout per interface. **But** if we were to assume this is not the case (addressing the original concern), then two objects could have same IID but different struct layouts and different functions. In such case, instead of failing, it would call the other function that was looked up, since it matches in IID and DISPID. It won't crash, but I don't think it would be quite correct, either. And it still makes the code simpler anyway.