Guidance on Authoring and Consuming COM Components in Windows 10 and Above
Looking for guidance on best practices for authoring and consuming COM components targeting Windows 10 and above. Some team members have limited experience with ATL, but it appears to be less suitable for modern COM component consumption. My thought is to use WinRT/C++.
Our project involves consuming a COM component from a third party. The third party has provided IDL files and type libraries for usage. However, the third party did not provide guidance on the appropriate consumption methods. A callback will also need to be implemented through a registered COM interface.
The project is being developed using Visual Studio 2022, and I've explored the following tech stacks for both authoring and consuming COM:
- ATL (Active Template Library) | Documentation
- C++/CX | Documentation
- WRL (Windows Runtime C++ Template Library) | Documentation
- WinRT/C++ | Documentation
C++/CX and WRL both suggest WinRT/C++ as the recommended approach for authoring and utilizing runtime components, while the ATL documentation does not carry this warning and seems to lack active development. Why does the ATL page not have this warning?
The ideal outcomes for this question are:
- To confirm WinRT/C++ is the correct technology for this use case over ATL.
- A suggestion for Microsoft to update the ATL documentation if it is no longer the recommended approach for consuming and authoring COM components in recent Windows versions.