winapicommarshallingwin32-process

Double hop marshaling in COM


Consider the following.

After this, will calls from A to C go through B? If the process B quits, will the object proxy in A error on method calls?

Yes, I'm kinky that way.


Solution

  • Tested. As of Windows 10 19044, COM short circuits the double hop. Killing B doesn't break the channel.

    Here are the samples. Build a.cpp, b.cpp, and c.cpp as three separate Windows GUI apps in Visual Studio. Run B and C in either order, then A. The A program has some UI to drive the test.