What are the relationship between COM , ActiveX, DLL ?

  • Thread starter Thread starter Ricky
  • Start date Start date
R

Ricky

Hi

Can anyone explain what are the relationship between COM , ActiveX, DLL ?

I really get confused about the terms...

Ricky
 
Ricky said:
Hi

Can anyone explain what are the relationship between COM , ActiveX, DLL ?

In a nutshell:

- DLL (Dynamic Link Library)
A file type for files that contain code: They contain code just like
executable files do, but unlike these DLLs have no entry point (no main
function) and can export functions. DLL files usually come with the DLL
suffix, but this is not neccessary (indeed, 'OCX' files are DLLs, too)

- COM (Component Object Model)
Is a specification for interaction between components. By these
specifications a component can written by one developer in one language can
be used by another developer in another language. Almost all windows
programming languages currently avaliable have some support for COM.
COM components often come in DLLs, but can also be implemented in executable
(EXE) hosts, or even in some non-compiled a scripting languages (e.g.
VBScript)
The COM protocol covers a wide variety of component interactions, from
simple calling-a-method-on-an-object, to late-bound UI-rich componets

-ActiveX
The line between COM and ActiveX is hard to draw: AFAIK ActiveX used to be a
marketing name for some COM technologies, that enabled "active content" in
IE. This usually includes ActiveX controls (also known as COM-Controls) and
ActiveX scripting (AKA Windows Scripting Engines).

Niki
 
Hi,

COM is a set of rules enabling interation between components written in
various language. It's a binary standard - in other words, COM, unlike .NET,
makes use of much less metadata and relies on method and property byte
offsets within an interface and on similar things.

ActiveX is a set of rules for controls running on Web pages. It is fully
COM-based, and gradually the meaning of this term has been extending,
including OLE controls, and finally the notions of COM and ActiveX has
become more or less interchangeable. But personally speaking, I'd still
consider ActiveX a more top-level concept, based on COM and extending it for
visual components.

Now, DLL stands for Dynamic-Linking Library. Its initial purpose was to
contain binary code which can be dynamically loaded and unloaded. Most of
Windows components are actually DLLs, by the way. DLLs were chosen as
containers for so-called in-process COM components - that is, components
that exist in the same address space that the calling executable exists in
(remember that in Windows each executable is given its own isolated address
space).

Similarly, DLLs has turned out to be a convenient container for .NET
assemblies as well. In this case, however, DLLs contain IL code rather than
raw CPU code.

Does this answer your question?
 
Back
Top