Essential COM

Author: Don Box
4.0
All Stack Overflow 16

Comments

by anonymous   2018-01-14
You should probably read Don Box's [Essential COM](https://www.amazon.com/dp/0201634465).
by anonymous   2017-11-06
If you are serious about laying a solid foundation, start with Don Box' [Essential COM](https://www.amazon.com/dp/0201634465). If you don't want to have to guess about every single line of code you are going to write, this is absolutely mandatory reading.
by anonymous   2017-08-20

I applaud your efforts to go with native C++ to deal with COM - you need to go through the pain to truly appreciate today's luxurious (managed) development environment :)

Back when the world (and I) were younger, Kraig Brockshmidt's book "Inside OLE" was the tome for making sense of COM (before COM even was COM). This book predates managed code, so no chance of managed confusion here. There's a second edition, too.

Don Box's books "Essential COM" and "Effective COM" were later, but welcome additions to the store of (unmanaged) COM knowledge.

However, if your wallet doesn't extend to acquiring these dusty old books, the Microsoft COM tutorial material here could help set you on the right track.

Happy hacking.

by anonymous   2017-08-20

Your question is a little large for a full explanation here. A quick high-level introduction to COM can be found in the book Understanding ActiveX and OLE. A more detailed but still introductory introduction is Inside COM. The best book on the subject is Don Box's Essential COM.

A couple of quick answers:

  • COM is a binary interface standard for objects. It allows various programs to write to interfaces without all having to have been written in the same langauge with the same compiler. There are also related services available.
  • GUIDs are globally unique numbers that COM uses to identify interfaces.
  • COM doesn't resolve different DLL version problems. It only allows a single DLL to be registered for each GUID.
by anonymous   2017-08-20

The .pas file is generated from the type library, which is typically contained within the COM DLL.

The .pas file defines the interface to the COM DLL. COM DLL's which come with embedded type libraries have self-describing interfaces. You still need documentation to understand what the interfaces and methods do, and how the parameters are used. But you don't need to write the boiler plate interface code yourself.

When a COM DLL has an embedded type library, you can create import units in your programming language of choice, not just Delphi.

If you want to know COM there is no better reference than Don Box's Essential COM, one of the finest computing books I have ever read.