The Essentials of COM – Part 2 – Now on Pluralsight!

My latest Pluralsight course is now available: The Essentials of COM – Part 2

The short version: Explore the essentials of the COM runtime. Understand how activation and registration decouple COM clients and servers. Learn about class factories, server lifetime issues, and COM’s remoting architecture.

Need more convincing? This is the second in a series of courses exploring the essentials of COM and the Windows Runtime. In this second course, you are going to learn everything you need to know to understand and use the classic COM runtime. You will learn how to implement COM servers from scratch, including activation through class objects, registration, and class factories. You will learn techniques for reliably registering COM servers with the Kernel Transaction Manager and how to support registration-free activation. You will learn how a COM server keeps track of its lifetime requirements, and how COM clients may schedule COM servers to be unloaded. Finally, you’re going to be introduced to COM’s remoting architecture, including local and remotable interfaces, proxies and stubs, IDL and the MIDL compiler. Having completed these two courses on the essentials of COM, you will be in a great position to start learning about the Windows Runtime.

The more I look at the Window Runtime the more I’m convinced that a thorough understanding of the essentials of COM and the COM runtime is a prerequisite for any study of WinRT. So much of WinRT is rooted in classic COM and the COM runtime.

Stay tuned for my upcoming course, “The Essentials of the Windows Runtime”.


6 thoughts on “The Essentials of COM – Part 2 – Now on Pluralsight!

  1. balhof

    Hi Kenny, thanks for another great tutorial. i have a quick question about unique_ptr. i thought that i understood the concepts until your demo. why does the Forage method on hen work after calling std::move to other. if the unique_ptr is empty i would expect a failure.

    std::unique_ptr hen(new Hen);
    std::unique_ptr other = std::move(hen);
    hen->Forage(); //???

    1. Kenny Kerr Post author

      That’s a good question! There are two parts to this problem. Firstly, that was a typo on my part. I should have changed it to “other->Forage();” to call the Forage method through the new owner. Secondly, STL asserts far less than I would like. The code works fine since the Hen class has no members. Add a member and the whole thing comes crashing down. The unique_ptr class template really should be asserting that it has a valid pointer inside its pointer dereference operator.

      Thanks for watching!

  2. nikobarli

    Took the course and love it very much ! Especially the minimalist style in the example codes which avoid distraction from the essential stuffs.

    BTW, I’d like to learn further on developing COM Server as a standalone EXE (and to make it accessible from remote PC). Do you have any good references on the topic ?

    Thanks and looking forward to the sequels !

    1. Kenny Kerr Post author

      I’m glad you enjoyed it! I’m hoping to do another course on COM in the near future.

      For now, I can only point you to two books on the topic. The first is “Essential COM” by Don Box where he talks about out-of-process servers. The second is “Programming Windows Security” where Keith Brown talks about COM security, which you’ll need to understand remote activation.

  3. Peter Evans

    When you demonstrated using the manifest based method of activation and showed the merge of the proxy into the server in the section on remote, I wonder if there is a means to have that be effected via manifest as well.

    1. Kenny Kerr Post author

      Absolutely! I ran out of time in that course but I hope to go much deeper into COM and WinRT in a future course. Anyway, you can use the comInterfaceProxyStub element alongside the comClass elements with iid and proxyStubClsid32 attributes.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s