Compartir a través de


Introduction to COM

 

The latest version of this topic can be found at Introduction to COM.

COM is the fundamental "object model" on which ActiveX Controls and OLE are built. COM allows an object to expose its functionality to other components and to host applications. It defines both how the object exposes itself and how this exposure works across processes and across networks. COM also defines the object's life cycle.

Fundamental to COM are these concepts:

  • Interfaces — the mechanism through which an object exposes its functionality.

  • IUnknown — the basic interface on which all others are based. It implements the reference counting and interface querying mechanisms running through COM.

  • Reference counting — the technique by which an object (or, strictly, an interface) decides when it is no longer being used and is therefore free to remove itself.

  • QueryInterface — the method used to query an object for a given interface.

  • Marshaling — the mechanism that enables objects to be used across thread, process, and network boundaries, allowing for location independence.

  • Aggregation — a way in which one object can make use of another.

See Also

Introduction to COM and ATL
The Component Object Model