COM Programming with C++

5 Day Course
Hands On

This course has been retired. Please view currently available C and C++ Training Courses.


Collapse all

Component Architecture (9 topics)

  • Components and component based systems
  • Issues in code re-use
  • Separating interface from implementation
  • Interfaces and polymorphism
  • Binary encapsulation
  • Virtual function tables
  • Instance management
  • Implementing multiple interfaces
  • Resource management and reference counting

COM Fundamentals: Writing a COM Client (7 topics)

  • Using COM objects from C++
  • Using COM objects from other clients
  • GUIDs
  • Using class objects
  • Introducing IUnknown
  • Using AddRef(), Release() and QueryInterface()

COM Fundamentals: Writing a COM Server (5 topics)

  • Implementing a COM object in C++
  • Implementing IUnknown
  • Implementing a class object and IClassFactory
  • Supporting multiple interfaces
  • Registering a COM server

Introduction to IDL (9 topics)

  • Defining an interface
  • Basic keywords
  • IDL types
  • Passing parameters in and out
  • Properties
  • Interface inheritance
  • Importing definitions
  • Type libraries and the library keyword
  • Using the MIDL compiler

Exploiting The Active Template Library (ATL) (7 topics)

  • C++ Templates
  • Features and benefits
  • CComModule
  • Interface and object maps
  • Implementing IUnknown and where your class fits
  • Registry scripts
  • Using the ATL wizards in Visual C++

Automation (7 topics)

  • Automation for late binding
  • IDispatch, dispids and dispinterfaces
  • Dual interfaces
  • Automation-compatible types
  • Properties
  • ATL support for Automation

Connectable Objects (3 topics)

  • Events and callbacks
  • Connection points
  • IConnectionPoint and IConnectionPointContainer ATL support for connection points

Threads and Apartments (6 topics)

  • COM threading issues
  • Protecting global and instance data
  • Single threaded apartments
  • Multi threaded apartments
  • Marshaling requirements
  • Apartment support in ATL

Out-of-Process Servers and Distributed COM (6 topics)

  • Issues with going cross-process
  • Marshaling with proxies and stubs
  • Writing EXE Servers
  • Remoting COM Servers with DCOM
  • Configuring servers with DCOMCNFG
  • Overview of security and threading issues

Introduction to COM+ Component Services (6 topics)

  • What is COM+?
  • Transactions in COM+
  • Object pooling
  • JIT Activation
  • COM+ Loosely coupled events
  • Queued components

The Way Ahead (2 topics)

  • Attributed C++
  • COM, COM+ and interoperation with .NET


Experienced C++ programmers who wish to develop COM-based applications. Six months C++ programming and at least three months Windows programming experience is essential. Familiarity with the Microsoft Visual Studio and Microsoft Visual C++. Prior attendance of one of our Windows Programming courses is also preferred.

Course PDF