Solution 2

In addition to the references Pablo's given you have a look at "Essential COM" by Don Box. It's a bit dated but still the definitive tutorial on COM programming.

Another thing to watch out for... Implementation inheritance is the tightest form of coupling you can get between two classes. By giving classes a common base with any form of implementation you're coupling the base to all the derived classes AND each derived class to every other derived class. If you want to change an implementation of one of the derived classes then you might have to change the base class which means an implicit change to all the other derived classes.

If you want common functionality consider using free functions and/or a contained object to get the effect you want. It'll make your design less fragile.

PS: Just thought, ATL uses the Curiously Recursive Template pattern first documented by Jim Coplien in "The C++ Report" yonks ago. It's a key feature of ATL's architecture so it might be worth looking it up. In case you're wondering it's a way of call derived class functions from a base class without using virtual functions.