ATL Development   «Prev  Next»
Lesson 5 Adding a COM class
Objective Add a COM class to the project.

Adding COM Class

How to Add COM Class

After generating an ATL-based server, our next step is to add COM object implementation classes. The ATL framework assumes that you are going to add one C++ class for each COM object in the server. Visual C++ supports two different ways to add a COM object into ATL: using Insert New ATL Object and using New Class. We will use New Class in this course.
To add a C++ implementation class for a COM object:
Adding COM Class
We have now added a C++ class, CPhBookObj, that implements COM object PhBookObj and its two interfaces, IReadPhBook and IManagePhBook. We will take a closer look at the results of our efforts, for example, files and code--in the following lessons.

Add Com Object - Exercise

Click the Exercise link to apply what you have learned about adding a C++ implementation class to a COM object.
Add COM Object - Exercise