OOPortal
SiteMap
Advanced COM
Basic COM
ATL Development
«Prev
Next»
Com Fundamentals
Component Object Model
COM Specification
Terminology Com Objects
COM Method Property
COM Interface Properties
Interface Definition Language
Compiling IDL Files
Implementing COM Objects
iunknown Interface Navigation
iunknown Reference Counting
COM Type Library
COM Basics
COM Class Objects
iclassfactory Creates Objects
COM Servers
InProcess Com Servers
Creating COM Objects
In Process Com Server
Core ATL Classes
Examine ATL Code
ATL Project Files
Designing Data Structures
Add readWrite Property
Add Read Only
Coding COM Methods
Add Phone Record
Add properties and methods to IReadPhBook - Exercise
Add properties and methods to IReadPhBook
Objective:
Add get_CurRec, put_CurRec, get_MaxRecs, get_NumRecs, and GetPhoneRec to CPhBookObj to implement to properties and methods of IReadPhBook.
Instructions
Part 1: Add properties and methods
Using the code listed above, add the following properties and methods to
IReadPhBook
:
get_CurRec
put_CurRec
get_MaxRecs
get_NumRecs
GetPhoneRec
Exercise scoring
This exercise is worth a total of 40 points.
Submission
Part 2: Build the project
Make sure the project builds without errors. When you are finished, copy your
IReadPhBook
implementation, from file
PhBookObj.cpp
into the text area below.
Submit