Exclusive
Visual Studio

Component Development Using the Active Template Library 3.0
(Microsoft Training Course: 1304) - 5 days - £2640 exc VAT



> Target Audience
THIS COURSE HAS NOW RETIRED. PLEASE SEE THE SUPPLEMENTARY INFORMATION FOR DETAILS OF ALTERNATIVE COURSES.
This course will teach programmers how to build component-based solutions using the Component Object Model (COM), the Active Template Library 3.0 (ATL), and Microsoft Visual C++ version 6.0.
> Course outline
  1. Introduction to COM
  2. Creating a COM Object
  3. Implementing Multiple Interfaces
  4. Introduction to ATL
  5. Automation
  6. Dual Interfaces
  7. Handling Events
  8. Creating Controls Using ATL
  9. Reusing COM Objects
  10. Custom Interfaces
  11. Threading Models
  12. Collections

Supplementary InformationThis course has now retired and is no longer available. We suggest you look at Course 2124: Programming with C#.
Module 1: Introduction to COM
  • Overview of COM
  • Creating a client of a COM object
  • How COM uses strings
  • Lab: Creating a client of a COM object
Skills
  • List the major goals of COM.
  • List the steps for creating a client of a COM object.
  • Explain the significance of the CLSID and ProgID of a COM object.
  • Create a client of a COM object.
  • Explain how data is exchanged between a COM server and a COM client.
top
Module 2: Creating a COM Object
  • Introduction to COM interface
  • The IUnknown interface
  • Creating a COM object
  • Creating a COM object server
  • Registering a COM object server
  • Lab: Creating a COM object
Skills
  • Explain the concept of immutability in relation to interfaces.
  • Explain, use, and generate a GUID (globally unique identifier).
  • Describe the purpose and functionality of the IUnknown interface.
  • Explain reference counting and its implications.
  • Create a COM object.
  • Create a COM object server.
  • Register a COM object server.
top
Module 3: Implementing Multiple Interfaces
  • Overview of multiple interfaces
  • Implementing multiple interfaces by using multiple inheritance
  • Implementing multiple interfaces by using embedding
  • Lab: Implementing multiple interfaces
Skills
  • Use multiple inheritance to implement COM objects with multiple interfaces.
  • Use embedding to implement COM objects with multiple interfaces.
top
Module 4: Introduction to ATL
  • Overview of ATL
  • Creating a COM object server by using ATL Wizards
  • Adding an interface to an ATL COM object
  • Registering an ATL COM object
  • Creating a client by using C++ extensions
  • Lab: Introduction to ATL
Skills
  • Explain the benefits of using ATL to create COM objects and object servers.
  • Use the ATL COM AppWizard to create a COM object server.
  • Use the ATL Object Wizard to add a simple COM object with a custom interface to ATL COM object server.
  • Use Visual C++ extensions to create a client of a COM object.
  • Explain the significance of each of the following in an ATL COM project: COM map; Object map; CComModule; CComObjectRoot; CComCoClass.
top
Module 5: Automation
  • Introduction to Automation
  • Features of an Automation object
  • Implementing Automation by using Dispatch Interfaces
  • Using structures in Automation
  • Creating a client of an Automation object
Skills
  • Explain the benefits of Automation.
  • Compare the methods and properties of an Automation object to the behaviors and attributes of a class.
  • Implement Automation for a COM object.
  • Use structures with Automation objects.
  • Create a client application for an Automation object.
top
Module 6: Dual Interfaces
  • Introduction to dual interfaces
  • Creating a dual interface using ATL
  • Creating a client for a COM object with dual interface
  • Creating multiple dual interfaces
  • Lab: Implementing dual interfaces
Skills
  • Describe the need for dual interfaces.
  • Explain the benefits and limitations of creating dual interfaces.
  • Create a COM object with dual interface using ATL.
  • Create a client for a COM object with a dual interface.
  • Implement multiple dual interfaces.
top
Module 7: Handling Events
  • Overview of events
  • Firing events using a dispinterface
  • Receiving events fired using a dispinterface
  • Firing events using a custom interface
  • Receiving events fired using a custom interface
  • Creating a sink at runtime
  • Lab: Adding events
Skills
  • Explain how events work in COM from a server and client perspective.
  • Enable a COM object to fire events using dispinterfaces and custom interfaces.
  • Create clients in Visual Basic C++ that can receive events from a COM object
top
Module 8: Creating Controls Using ATL
  • Overview of controls
  • Adding properties to a control
  • Implementing the container
  • Working with controls
  • Lab: Creating an ATL control
Skills
  • List the types of controls supported by ATL.
  • Create a control using the ATL Object Wizard.
  • Add methods and properties to a control and implement them.
  • Modify the OnDraw method to draw graphical output for a control.
  • Register and license a control.
top
Module 9: Reusing COM Objects
  • Reusing source code
  • Reuse options available in COM
  • Implementing aggregation
  • Implementing containment
  • Implementing a tear-off interface
  • Lab: Object reuse in COM
Skills
  • Design a COM containment and COM aggregation.
  • Implement containment and aggregation to reuse COM objects.
  • Create a tear-off interface.
top
Module 10: Custom Interfaces
  • Introduction to custom interfaces
  • Location of the COM server
  • Introduction to marshaling
  • Remoting efficiency
  • Lab: Custom interfaces
Skills
  • List the advantages and disadvantages of using custom interfaces.
  • Create a custom interface using ATL.
  • List the techniques available for improving memory usage and performance of a remote COM server.
  • Explain the standard and custom marshaling techniques.
top
Module 11: Threading Models
  • Single-threaded applications
  • Apartment models
  • Registering the threading model
  • Lab: Threading models
Skills
  • Describe the limitations of single-threaded applications.
  • Explain the differences between single-threaded apartment model, multi-threaded apartment model, and mixed threading model.
  • Explain how mixed threading models can cause marshaling issues.
  • Register a threading model.
top
Module 12: Collections
  • Overview of collections
  • Creating a collection
  • Implementing a collection
  • Using a collection
  • Lab: Collections
Skills
  • Explain the role of enumerators in using a collection.
  • Create and implement a collection.
  • Write client-side code to use a collection.
top
> Pre-Requisites
Before beginning this course, students should be able to:
  • Describe and use the following C++ fundamentals: Constructors and destructors; Virtual functions; Conversion functions; Function overloading; Operator overloading; accessors; Single and multiple inheritance; Templates.
  • Use the Windows® environment and use the Visual Studio® integrated development environment.
> Purpose
At the end of the course, students will be able to use COM to address component-based software development issues; build clients of COM objects; build COM object servers; create ActiveX controls; use Visual C++ extensions to create clients of COM objects; build COM objects that reuse existing COM objects; add events to COM objects and clients; create COM objects with dual interfaces.
> Supplementary Information
This course has now retired and is no longer available. We suggest you look at Course 2124: Programming with C#.