👩💻 Join our community of thousands of amazing developers!
The C++/WinRT library’s implements template does the heavy lifting of implementing COM classes. One of the extension points is a method called query_interface_tearoff. This method is called as part of the implementation of the IUnknown::QueryInterface method if the caller is asking for an interface that wasn’t declared as part of the implements type parameter list. The post The C++/WinRT <CODE>query_<WBR>interface_<WBR>tearoff</CODE> extension point, and using it for COM aggregation appeared fi...