Pretty it isn't, but it does work. In fact, despite the grotesqueness of this technique, it is amazingly handy in other situations that don't even involve DLLs. But the idea works like this. There is probably a wizard that you can run. Also, make sure you create a COM object, and not an automation object.
Automation just makes everything more difficult.
Inside the COM project, create a new COM object. MSVC will probably want you to create an COM interface. Since we are wrapping a class called CFoo , a good interface name would be IFoo . MSVC will also want you to name the implementation class for the COM obect. CFooImpl is a good candidate.