From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- include/combaseapi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/combaseapi.h b/include/combaseapi.h index 41461f22e98..d3aa4a08bd9 100644 --- a/include/combaseapi.h +++ b/include/combaseapi.h @@ -57,4 +57,17 @@ HRESULT WINAPI RoGetAgileReference(enum AgileReferenceOptions options, REFIID ri } #endif +#ifdef __cplusplus + +extern "C++" template<typename T> void **IID_PPV_ARGS_Helper(T **obj) +{ + (void)static_cast<IUnknown *>(*obj); + return reinterpret_cast<void **>(obj); +} + + +#define IID_PPV_ARGS(type) __uuidof(**(type)), IID_PPV_ARGS_Helper(type) + +#endif + #endif /* _COMBASEAPI_H_ */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7482