tags:

views:

52

answers:

2

I have just finished my first COM server DLL. And it runs smoothly. So I'd like to show my understanding for now and hear your critics.

1- How COM simply works? COM - "The Call Chain"

COM Lib methods -> Traditional DLL exports -> Classes encapsulated in the COM DLL

2- With C++, the benefits like "interface" in OOP can only be taken advantage of at the source level. With COM, these benefits can be used at a binary level.

3- Some illustration about interface

&pInterface -------> pInterface ----------> Interface-----------------> methods

  Ixx **         Ixx *      (method table)

 (void **)

A Interface is a data structure in memory. It's nothing but a memory area containg a method table.

Is my understanding alright?

Thanks for your revision.

+3  A: 

Is my understanding alright?

Somewhat, you are summarising very heavily so hard to be sure.

If you want to know COM at this level, two of the best sources are "Essential COM", Don Box (pre-Windows 2000 so significant details of "Rental" threading model don't match the "Neutral" model); and the COM Specification (from MS, years ago, and was online but cannot quickly find a link now).

Richard
+1 For Don Box's book. Not only a great COM book but a really well written tech book full stop.
David Relihan
Thanks Richard, I am currently reading an old book <Beginning ATL COM Programming> by Grimes, Stockton, Reilly and Templeman. I'll read Don Box's.
smwikipedia
Oleg
It seems <Beginning ATL COM Programming> has lots of aweful comments on Amazon.com
smwikipedia
A: 

you can find a lot of interesting information about COM at www.codeproject.com (see http://www.codeproject.com/KB/COM/index.aspx?#COM/DCOM/COM+%20-%20Beginners for example)

Oleg