COM / OLE / ActiveX / IDispatch confusion

activexcomidispatchole

I can't wrap my head around the differences among these terms.

Are COM and ActiveX synonyms?

Is ActiveX object just a COM object that exposes IDispatch?

Lots of older MSDN pages mention IDispatch without any COM context. Does it have a separate history, and was just introduced under the COM 'umbrella' later in its lifecycle?

Where does OLE fit in? Is its (considerable) presence in MFC naming and MSDN in general – all just legacy?

Wikipedia gives some insight, but not much. I couldn't find a more in depth reference.

Best Answer

Found some quotes from COM Programming by Example:

Another thing you'll quickly find with COM is that marketing had a field trip day with the terminology. Rather then helping to promote understanding, you'll find in most cases it promotes mystery. ... OLE, ActiveX, Remotable Objects - which one means what this week? ...

COM evolved out of the solution to a specific problem - how to allow a word processor to edit the spreadsheet in a letter without the user having to exit the word processor to do it. This solution was called OLE. ... However, with the second release of OLE (OLE2), its creators modified OLE32.DLL to expose more of the basic functionality of OLE so that its API could be used to allow any application to acess the functionality of another. This API, which hasn't changed much since 1993, is what is considered to be the COM API. ...

Once the COM API was exposed, Microsoft used it to create what were then called OLE controls to allow sophisticated controls (e.g., buttons that spiral, list boxes that play music) written in Visual C++ to be accessible to Visual Basic applications. Eventually this same technology was used to allow a control to be downloaded and used by your web browser. At this point, the name changed to ActiveX controls or just plain ActiveX purely for marketing reasons. Although you can package any functionality in an ActiveX Control, its requrirements have been specialized for supporting a user interface control.

I'm still curious about the very last sentence - must a COM object satisfy some additional requirements to qualify as an ActiveX control? - but its enough to let it go.

Thanks for your answers!

Related Topic