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.