I have a C ++ class that can optionally support some additional functions (defined by abstract interfaces). There is a way in Microsoft COM to define a class for such functions using QueryInterface(GUID, void**). This requires reinterpret_cast for all interfaces for void *. My question is, is there a safer way to achieve the same without casting?
source
share