On 2013-06-27 13:33, Jacek Caban wrote:
That said, if such interfaces are just obscure special case, I would say we shouldn't care. We may easily avoid them (I just sent a patch avoiding it in mshtml).
Ah, I hadn't even considered changing the interface. Seemed like it was something mandated by Mozilla's use of it. This indeed seems to be the best solution to the immediate problem of mshtml not building with MSVC. Thanks!
If you want a better solution to avoid such problems in the future, I would suggest adding an error, like midl does. This will, however, require some more changes in Wine. At least MSHTML already has an interface identical to IUnknown (nsISupports), which would cause the error. This should be solvable with some tricks.
That sounds like the smart thing to do. I've attached the simplest version that comes to mind. The interfaces I needed to exempt were IUnknown (naturally), ID3DInclude (which PSDK seems to define via cpp_quote), and nsISupports as you already mentioned. Midl also seems to have an "if not inside a library" condition, which I'll try to add as well. I'd have liked to use is_object in widl, but that also triggers on the odl attribute.
I'll send it to -patches once I'm satisfied with it, but I'm pretty fond of the simple approach already. Let me know if you have any comments.
Thanks a lot. -Thomas