I think it would be very nice to have something like that to reduce the burden of implementing COM interfaces. This shows for instance on the windows.gaming.input module a 30% LoC reduction (from ~6800 to ~4700), even though the module already had a boilerplate helper macros already.
The MR introduces macros to automatically implement each IUnknown method, as well as all of them at once. It also includes a helper to implement IInspectable methods at once, as well as macros to forward both interface methods to a base interface or an outer object. Last, it provides higher-level macros to implement a main interface and any number of sub interfaces and generate IUnknown, forwarding and vtables for all of them at once, with IInspectable support when needed.
It uses widl to generate additional per-interface macros, for things like inheritance and vtable generation. The rest of the macros are otherwise shared in a Wine-specific header.
The implementation is split to show individual macro being used, although they are later replaced by higher-level macros. The individual helpers are still useful in some corner cases where specific behavior needs to be implemented, or for aggregating classes.
-- v3: include: Add a parameter to COM helper END to control QI traces. windows.gaming.input: Use the new COM macros everywhere possible. include: Introduce new macros for COM heritage implementation. widl: Generate some INTERFACE_IMPL/FWD helper macros. include: Introduce new macros for IInspectable WinRT implementation. include: Introduce new macros for COM IUnknown implementation. include: Introduce new macros for COM QueryInterface implementation. widl: Generate some QUERY_INTERFACE helper macros. include: Introduce new macros for COM AddRef/Release implementation. include: Introduce new helper macros for COM implementation. windows.gaming.input: Use the new INTERFACE_VTBL macros. widl: Generate some INTERFACE_VTBL helper macros. windows.gaming.input: Use a separate interface for IAgileObject.