On Mon Aug 21 06:43:00 2023 +0000, Chip Davis wrote:
Microsoft's `<unknwn.idl>` actually has similar C++ helpers for `IUnknown`, emitted using `cpp_quote()`. What they end up doing is, they emit the entire interface twice: once manually with the C++ helpers, and once generated by the IDL compiler. I don't know if it's worth doing that here. An alternative is to have `cpp_quote()` emit its literal text inside the interface when it is found inside an interface. But this behavior would diverge from MIDL.
I'm not sure if my `unknwn.idl` file is different but all I see is a copyright header wrapped in `cpp_quote()`. Though, in `WeakReference.idl`, they hard-coded the entire `IWeakReference` interface in `cpp_quote` tags to generate it manually and also allow the IDL compiler to generate it. This is what I was referring to in my previous comment, I'm guessing this is what you meant? But yeah, it's not really worth doing that here.
Yeah, we could add that to WIDL, but as you said it would diverge from MIDL. Though, it wouldn't be breaking anything so I'm not sure if it's acceptable in Wine or not.