Runnng Object Table (ROT)

The ROT is a system-wide table that keeps track of COM objects that are in use. The interface to the ROT is COM-based. Use the Win32 function GetRunningObjectTable to get an IRunningObjectTable object pointer.

The ROT contains monikers that identify COM objects. Similar to how COM classes are identified by a CLSID, which is a GUID in the registry, COM objects are identified by a moniker, which is a system object that implements IMoniker in the ROT. There is a moniker for every entry in the ROT.

Monikers can be used to get their corresponding COM object using CoGetObject. CoGetObject takes a string argument, that can either be

  • the full path to a file.
  • a string of the form @ProgID:Parameters, where the parameters are a free form string that is interpreted by the moniker.

In the second option, one possibility for passing parameters would be to use the query part of an HTTP GET URL. The pattern is to implement IParseDisplayName in the moniker’s factory class. In ParseDisplayName, split the string and save off the parameters in the moniker object. In turn, the moniker can use this to initialize the COM object.

Microsoft used to provide a tool called IRotView.exe for browsing the ROT table, but this seems to be out of support.


References

GetRunningObjectTable function (objbase.h) - Win32 apps | Microsoft Learn IRunningObjectTable (objidl.h) - Win32 apps | Microsoft Learn IMoniker (objidl.h) - Win32 apps | Microsoft Learn IEnumMoniker (objidl.h) - Win32 apps | Microsoft Learn IBindCtx (objidl.h) - Win32 apps | Microsoft Learn CoGetObject function (objbase.h) - Win32 apps | Microsoft Learn IParseDisplayName (oleidl.h) - Win32 apps | Microsoft Learn