COM Objects

What is an Object?

What are COM Objects?

The Microsoft Component Object Model (COM) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM is the foundation technology for Microsoft's OLE (compound documents), ActiveX (Internet-enabled components), as well as others.

The term “COM Object” refers to an executable code section which implements one or more interfaces deriving from IUnknown. IUnknown is an interface with 3 methods, which support object lifetime reference counting and discovery of additional interfaces.

Where are COM Objects Stored?

  • HKEY_CURRENT_USER\Software\Classes\CLSID

  • HKEY_LOCAL_MACHINE\Software\Classes\CLSID

Every COM object is identified by a unique binary identifier. These 128 bit (16 byte) globally unique identifiers are generically referred to as GUIDs. When a GUID is used to identify a COM object, it is a CLSID (class identifier), and when it is used to identify an Interface it is an IID (interface identifier). Some CLSIDs also have human-readable text equivalents called a ProgID.

Enumerate Available Lists and Properties of CLSID

activator is a type accelerator

[activator]::CreateInstance([type]::GetTypeFromCLSID("DE75D012-7A65-11D2-8CEA-00A0C9441E20")) | get-member

In this case, [activator] is a type accelerator. PowerShell type accelerators are aliases for .NET classes or types, which makes using classes in PowerShell scripts much easier. The intention behind type accelerators is to use shorter names for .NET classes and types and save some unnecessary typing. For example, when you use the type accelerator [int] to define an integer value, there's actually no data type called int. Instead, it's just an alias for the [System.Int32] class.

Useful References:

Last updated