Component Object Model

COM
Component Object Model
AbbreviationCOM
StatusIn force
First published1993; 31 years ago (1993)
Latest versionLiving standard
2021
OrganizationMicrosoft
SeriesSystem Services
Base standardsMIDL, UUID
Related standards
DomainComponent Interfacing
Websitelearn.microsoft.com/en-us/windows/win32/com/the-component-object-model

Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines.

COM is the basis for other Microsoft domain specific component technologies including OLE, OLE Automation, ActiveX, COM+, and DCOM as well as implementations such as DirectX, Windows shell, UMDF, Windows Runtime, and Browser Helper Object.

COM enables object use with only knowing its interface; not its internal implementation. The component implementer defines interfaces that are separate from the implementation.

Support for multiple programming contexts is handled by relying on the object for aspects that would be challenging to implement as a facility. Supporting multiple uses of an object is handled by requiring each object to destroy itself via reference-counting. Access to an object's interfaces (similar to Type conversion) is provided by each object as well.

COM is available only in Microsoft Windows and Apple's Core Foundation 1.3 and later plug-in application programming interface (API).[1] The latter only implements a subset of the whole COM interface.[2]

Over time, COM is being replaced with other technologies such as Microsoft .NET and web services (i.e. via WCF). However, COM objects can be used in a .NET language via COM Interop.

COM is similar to other component technologies such as SOM, CORBA and Enterprise JavaBeans, although each has its strengths and weaknesses.

Unlike C++, COM provides a stable application binary interface (ABI) that is unaffected by compiler differences.[3] This makes using COM advantageous for object-oriented C++ libraries that are to be used by clients compiled via different compilers.

  1. ^ "Documentation Archive". developer.apple.com.
  2. ^ "Plug-ins and Microsoft's COM". Apple Inc. Retrieved October 5, 2010.
  3. ^ Microsoft forum: Binary compatibility across Visual C++ versions