Learn how Windows COM really works by building it yourself in C++. Pavel Yosifovich, co-author of Windows Internals, takes you from plain C++ classes to interfaces, IUnknown, class factories, activation and registration, then to IDL, type libraries and ATL, with hands-on labs including a client for the Windows BITS service.
14+ hours
on-demand video
Labs
with full solution walkthroughs
55
video lessons
3
downloadable resources
12 CPE
CEU credits, self-reported
Certification
Certificate of completion
The Component Object Model is everywhere in Windows. The shell, DirectX, the Background Intelligent Transfer Service, Windows Management Instrumentation and the Windows Runtime are all built on COM, and countless enterprise applications still ship COM components. Yet most developers only ever call CoCreateInstance and hope for the best. When registration fails, a reference leaks or a call deadlocks, they have no model of what is happening underneath.
In this course Pavel Yosifovich, co-author of Windows Internals, builds that model from first principles. You start with a plain C++ class in a DLL and fix its problems one by one until you arrive at COM: abstract interfaces, vtables, factories, runtime interface discovery and reference counting. Then you implement a complete in-process COM server by hand, with its class factory, DLL exports and registration, and write clients for it in C++ and C#. The second half covers callbacks with the Windows BITS service, interface definitions in IDL and type libraries, and building components with ATL, including smart pointers, non-creatable classes, singletons, containment and aggregation.
The course is a recording of a live class: 55 video lessons, with the slides, a lab manual and the lab sources. You build several COM servers and clients along the way, from a bank account server to an RPN calculator and a process manager. The course covers the first four modules of the COM curriculum; automation, out-of-process servers and apartments continue in COM Programming 2. Every video has English captions, and you learn at your own pace with lifetime access.
Pavel has been building Windows software in C and C++ for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.
His work on Windows internals and system programming shapes how he teaches COM: not as a set of APIs to memorize, but as a design you build yourself, so you understand exactly how activation, registration and interfaces work.
Not the right fit if you are new to C++ (take Modern C++ Programming first) or to the Windows API (start with Windows System Programming 1). Automation (IDispatch), out-of-process EXE servers and apartments are covered in COM Programming 2.
Roles this course prepares you for: Windows developers, security researchers and malware analysts.
COM is one of those technologies that every serious Windows developer meets sooner or later, whether calling shell and DirectX APIs, maintaining a legacy component, exposing native code to .NET, or researching how Windows activates objects. This course gives you a complete, working understanding of COM in C++, from the binary standard up to ATL.
Most chapters combine slides, live coding and debugging, and the labs are followed by full solution walkthroughs. This course covers the first four modules of the live class. Automation with IDispatch, out-of-process EXE servers, marshaling and COM threading and apartments continue in COM Programming 2.
COM is not legacy trivia. It is the foundation of large parts of Windows, including the shell, DirectX, BITS, WMI and the Windows Runtime, and many Windows APIs are only available through COM interfaces. Understanding COM lets you use those APIs confidently, write and maintain components that other languages can call, and diagnose the registration, lifetime and threading problems that otherwise feel like magic.
The course does not start with wizards. You first build a COM server from scratch, so you see every piece: the interface, the class, the class factory, DllGetClassObject and registration, stepped through in the debugger. Only then do you move to ATL, and you understand what the generated code does for you. The same template-based style continues in GUI Programming with WTL, and both COM courses are part of the Windows Master Developer learning path.
Meet the course and its instructor: the goals, the prerequisites, the module plan and recommended books and resources. The slides, the lab manual and the lab sources are available here. This course covers modules 1 to 4 of the live class; modules 5 to 7 are covered in COM Programming 2.
Why COM exists, shown step by step. Starting from a C++ class exported from a DLL, the chapter fixes its problems one at a time: immutable abstract interfaces, vtables, factory functions, extending interfaces, discovering interfaces at runtime and reference counting. It ends with the idea that COM is a language-neutral binary standard built on exactly these mechanisms.
The ideas from the first chapter mapped onto real COM. You learn where COM came from, what a COM object is, the IUnknown interface with QueryInterface, AddRef and Release, the calling convention, GUIDs and HRESULTs, and the rules for QueryInterface, object identity and reference counting.
Your first COM component, built from scratch without ATL. You define an IAccount interface and its IID, implement the class and IUnknown, add a class factory, and write a client that creates the object with CoGetClassObject and CoCreateInstance. The chapter ends with a “class not registered” error, which sets up the next chapter.
How COM creates objects. The chapter explains the two-step creation model, the class factory and CoCreateInstance as the shortcut, and how an in-process server is activated: the registry lookup, InprocServer32 and DllGetClassObject, stepped through in the debugger. It also builds a C# client using COM interop and covers the 64-bit, threading and vtable-order pitfalls.
The functions every COM DLL exports: DllGetClassObject, DllRegisterServer, DllUnregisterServer, DllCanUnloadNow and DllInstall. You implement self-registration with regsvr32, learn how HKEY_CLASSES_ROOT merges machine and per-user registrations and what that means for admin rights, and handle 32-bit versus 64-bit registration. It ends with a recap of all the steps to build a server.
Two hands-on labs. The first is a COM client for the Windows Background Intelligent Transfer Service: create a download job, add a file, start it, poll its state and handle errors. The second builds a complete COM server from scratch, an RPN calculator, with its interface, class, class factory, DLL exports and registration, plus a client.
Finishing the hand-built servers. You debug registration with regsvr32, fix per-user registry placement, and compare per-user and per-machine registration. Then you extend a class with a second interface through QueryInterface, and use __uuidof and declspec(uuid) as a cleaner way to work with GUIDs.
COM callbacks with a real Windows service. You implement IBackgroundCopyCallback so BITS notifies your client when a transfer completes, fails or changes, instead of polling. Along the way you build a local object without a class factory, free COM-allocated memory correctly, and debug a deadlock caused by the apartment model.
Defining interfaces the COM way. You learn why C++ headers are not enough, the RPC heritage of IDL, its attributes and types, and what the MIDL compiler generates: the header, the GUID file, proxy and stub sources and the type library. The chapter also covers properties and inspecting type libraries with OleView.
Building COM servers with the Active Template Library. You create a full in-process server with the ATL wizards and walk through what they generate: the IDL, the module object, the registration script and the COM map. Then you add methods and a second interface, write a C++ client, and summarize the ATL workflow.
ATL and COM in depth. The chapter inspects servers with the OLE/COM Object Viewer, explains the ATL class hierarchy, and covers COM smart pointers with ATL and WIL and the #import directive. You build a NumberStack server with a .NET client, a process manager with non-creatable classes created through a root object, and learn singleton class factories and COM reuse through containment and aggregation.
No. The course starts from plain C++ classes in a DLL and builds up to COM step by step, then shows the real COM mechanisms.
Solid C++ (classes, inheritance, virtual functions and pointers) and some experience with the Windows API. If you need to strengthen those first, take Modern C++ Programming and Windows System Programming 1.
A Windows 10 or 11 PC with Visual Studio 2022 and its C++ workload, including ATL. The course also uses regsvr32, Registry Editor and OleView, and a few demos use a C# client and the WIL library from NuGet.
Yes. You build a COM server by hand, register it, write C++ and C# clients, use the Windows BITS service as a real COM API, and complete labs such as an RPN calculator server, a NumberStack server with ATL and a process manager with non-creatable classes.
Yes. Two chapters cover ATL: the wizards, the generated IDL, registration scripts, COM maps, the ATL class hierarchy, smart pointers, singletons, non-creatable classes and aggregation.
Not in depth. Automation with IDispatch, out-of-process EXE servers, marshaling, and COM threading and apartments are covered in COM Programming 2. Apartments come up briefly in the BITS callback lab.
Windows System Programming 3 has a single introductory COM module. COM Programming 1 is a full course that implements servers from scratch, covers registration, IDL, ATL and smart pointers in depth, and includes several labs.
Recorded and self-paced. It is a recording of a live class, so you will occasionally hear student questions. You get lifetime access, and every video has English captions.
COM Programming 2, which covers automation, EXE servers and marshaling, and COM threading and apartments. Both courses are part of the Windows Master Developer learning path.
Yes. When you complete every lesson you receive a certificate of completion and a Credly digital badge. The course also earns 12 CPE/CEU credits, which you self-report to your certification body using your certificate.
Yes. Three lessons are free to preview: Introduction, Why COM and IUnknown. Watch them on the course page.
55 video lessons, more than 14 hours of video, plus the slides, the labs PDF and the code.
$390 as a single payment, or 4 monthly payments of $99 ($396 in total). It is also included in the Windows Master Developer learning path.
Lifetime access, including future updates. Videos stream in the browser and cannot be downloaded.
Yes. Refunds are available up to 14 days after purchase, to the original payment method. Email [email protected].
Pavel has been building Windows software in C and C++ for more than 25 years, as a developer, consultant, trainer, author and speaker, and is a Microsoft MVP. He is the co-author of “Windows Internals, 7th Edition, Part 1” (Microsoft Press) and the author of “Windows Kernel Programming”, “Windows 10 System Programming” and “Windows Native API Programming”.
His work on Windows internals and system programming shapes how he teaches COM: not as a set of APIs to memorize, but as a design you build yourself, so you understand exactly how activation, registration and interfaces work.
Learn how Windows COM really works by building it yourself in C++. Pavel Yosifovich, co-author of Windows Internals, takes you from plain C++ classes to interfaces, IUnknown, class factories, activation and registration, then to IDL, type libraries and ATL, with hands-on labs including a client for the Windows BITS service.