Search notes:

COM Object

Every COM object needs an IUnknown interface. In fact, a COM object is a struct whose first member (or element) is a pointer to a IUnknown or IUnknown-derived vTable.
All COM objects are identified by a GUID: the CLSID (= class identifier). Some are additionally identified by ProgIds.

Creation of COM objects

PowerShell new-object -com …
VBA createObject
AutoHotKey comObjCreate(…)

PowerShell

With PowerShell, a COM object can be created like so
PS C\> $comObj = new-object -comObject prog.id
After creating the object, its methods can be displayed
PS C:\> $comObj | get-member -mem method

VBA - Visual Basic for Applications

In VBA, a COM object can be created with createObject(…).

Autohotkey

In AutoHotKey, a COM object can be created with comObjCreate(…).

Calling methods with default value

In order to pass the «default» value to a COM method from C# or PowerShell, System.Reflection.Missing.Value must be used.

See also

COM
Every COM object belongs to exactly one apartment.
Machine readable Information about an object's methods or argument names can be stored in a type library.

Index