Mix COM / OLE / ActiveX / IDispatch

I cannot plunge my head into the differences between these terms.

Are synonyms COM and ActiveX?

Is the ActiveX object a COM object that IDispatch provides?

Most older MSDN pages mention IDispatch without any COM context. Does it have a separate story and was just introduced under the COM umbrella later in its life cycle?

Where is OLE located? Is its (significant) presence in MFC naming and MSDN in general - is it all just a legacy?

Wikipedia gives some insight, but not so much. I could not find a deeper link.

+6
com activex ole idispatch
source share
3 answers

Found several quotes from COM Programming for example :

Another thing you'll quickly find COM is that marketing has been a field day with terminology. Instead, helping to promote understanding, you will find that in most cases this contributes to mystery .... OLE, ActiveX, Remotable Objects - does this mean that this is a week? ...

COM came out of the solution to a specific problem - how to allow the word processor to edit a table in a letter without the need for a word processor user to do this. This solution was called OLE .... However, with the second release of OLE (OLE2), its creators modified OLE32.DLL to expose more basic OLE functions so that its API could be used so that any application could have the functionality of another. This API, which has not changed much since 1993, is what is considered the COM API ....

When the COM API was opened, Microsoft used it to create what was then called OLE control to enable complex controls (for example, buttons are a spiral, a list of boxes that play music) written in Visual C ++ to be accessible for Visual Basic Applications. Ultimately, the same technology was used to provide control for downloading and using the Internet browser. At this point, the name is changed to ActiveX controls or just plain ActiveX for marketing reasons. Although you can have functionality in ActiveX Control, its requirements were specialized to support the user interface.

I'm still interested in finding out the last sentence - should a COM object satisfy some additional requirements in order to qualify as an ActiveX control? - but enough to let him go.

Thank you for your responses!

+7
source share

ActiveX is marketing for COM, although ActiveX is commonly used in the context of "ActiveX controls" that are GUI objects.

IDispatch is an interface implemented by COM objects, so client programs can dynamically call their methods at runtime (late binding), and not at compile time, when all methods and argument types must be known in advance.

OLE is an earlier version of COM.

+4
source share

Regarding OLE: COM has its roots in OLE. But today, OLE can be considered built on top of COM and is mainly used for what its name suggests - document binding and embedding. Although COM itself defines only a couple of interfaces (IUnknown, IClassFactory, IMalloc, etc.), OLE adds a whole bunch of additional interfaces, such as IMoniker, IOleItemComtainer, etc.

To summarize: COM is the foundation, ActiveX and OLE are layers on top of COM.

+1
source share

All Articles