I am considering using COM interfaces within an embedded (non-Windows) system that has a limited C++ compiler, and I am looking for an open-source COM implementation using simple C++, in particular with little or no use of templates and without use of exceptions (yes I know COM doesn't use exceptions but an implementation could use them internally).
At this point I'm mainly looking for C++ definitions of all the core COM types i.e. IUnknown, IDispatch, VARIANT etc. plus some helper classes for smart pointers, BSTRs etc. Some level of support for implementing QueryInterface and IDispatch might be nice but I can also do that myself. I'd like to find an ITypeInfo implementation, and an embedded implementation of DCOM would be attractive.
I know I could use Microsoft's source supplied with Visual Studio but I would rather avoid it because of the complexity of pulling in a lot of definitions that I don't need, plus I want to avoid any possible legal issues with using it on a non-Windows platform. I'm also thoroughly familiar with ATL and I can't use such a heavily templated approach due to compiler limitations. I have a lot of experience with COM and DCOM so I could write all of the definitions and helper classes myself, and I could even write my own DCOM system if needed. But I'd rather use an existing open-source implementation if there is one. Do you have any recommendations?