Search notes:

COM

COM is the Component Object Model, thus, everything in COM revolves around COM objects.

Registry

Some relevant registry keys for COM are:

Reserved/Well known DISPIDs

Four DISPIDs are reserved:
Apparently, in VBA classes, a method can be decorated with the attribute … vb_userMemId construct to assign predefined disp ids to such a member.

Running Object Table

The Running Object Table (ROT) is a look-up table that keeps track of (registered?) objects. These are identified by a moniker. The form of the entries is (pmkObjectName, pUnkObject). pmkObjectName is a pointer to the moniker.
The goal of the ROT is that a client can bind a moniker to an already running object instead of creating a new object.
A registered(!) object can be looked up in C with the WinAPI function GetActiveObject() and in Visual Basic for Application with GetObject().
An Office application does not register itself right after starting to optimize the startup process. Instead, the registration only takes place when the application looses focus.
In .NET, a COM Object can be located in the ROT with the GetActiveObject() method in System.Runtime.InteropServices.Marshal.

HRESULT

Common HRESULT values include
Value Name Description
0x00000000 S_OK Operation successful
0x80004001 E_NOTIMPL Not implemented
0x80004002 E_NOINTERFACE No such interface supported
0x80004003 E_POINTER Pointer that is not valid
0x80004004 E_ABORT Operation aborted
0x80004005 E_FAIL Unspecified failure
0x8000FFFF E_UNEXPECTED Unexpected failure
0x80070005 E_ACCESSDENIED General access denied error
0x80070006 E_HANDLE Handle that is not valid
0x8007000E E_OUTOFMEMORY Failed to allocate necessary memory
0x80070057 E_INVALIDARG One or more arguments are not valid
See also: the System.Runtime.InteropServicves.COMException class is a wrapper for unrecognized HRESULT values.

TODO

COM in plain C (CodeProject). Part 2, 3, 4, 5, 6, 7 and 8.
http://progtutorials.tripod.com/COM.htm

OLE relatated technologies

COM The fundamental object model: IUnknown, IClassFactor etc.
DCOM Distributed (remoting) COM: IDL, NDR pickling, the SCM etc.
Automation IDispatch, VARIANT, type libraries etc. (Sometimes also referred to as OLE Automation although it has nothing to do with OLE!)
Active/X Specification/protocles for «controls» and their containers

See also

Useful COM object libraries
Calling the Windows API from VBA: declarations for OLE/COM
dllhost.exe, ole_32.dll
The .NET class/attribute System.STAThreadAttribute.
The .NET namespaces System.EnterpriseServices and System.Runtime.InteropServices.
The /link compiler option of the C# compiler
oleview.exe is an OLE/COM object viewer.
In the world of .NET, COM is «Unmanaged code».
COM Apartments

Links

ComPower is a PowerShell module to work with COM.
Microsoft: COM Fundamentals
The PowerShell module COM

Index