Export (0) Print
Expand All

IRunningObjectTable interface

Manages access to the running object table (ROT), a globally accessible look-up table on each workstation. A workstation's ROT keeps track of those objects that can be identified by a moniker and that are currently running on the workstation. When a client tries to bind a moniker to an object, the moniker checks the ROT to see if the object is already running; this allows the moniker to bind to the current instance instead of loading a new one.

When to implement

You do not need to implement this interface. The system provides an implementation of the ROT that is suitable for all situations.

When to use

You typically use the ROT in a moniker provider (hands out monikers identifying your objects to make them accessible to others) or if you are writing your own moniker class (that is, implementing the IMoniker interface).

A moniker provider registers its objects with the ROT when it begins running and revokes the registrations when no longer running. This enables the monikers that it hands out to be bound to running objects. You should also use the ROT to record the object's last modification time. You can get an IRunningObjectTable interface pointer to the local ROT by calling the GetRunningObjectTable function.

The most common type of moniker provider is a compound-document link source. This includes server applications that support linking to their documents (or portions of a document) and container applications that support linking to embeddings within their documents. Server applications that do not support linking can also use the ROT to cooperate with container applications that support linking to embeddings.

If you are writing your own moniker class, you use the ROT to determine whether a object is running and to retrieve the object's last modification time. You can get an IRunningObjectTable interface pointer to the local ROT by calling the IBindCtx::GetRunningObjectTable method on the bind context for the current binding operation. Moniker implementations should always use the bind context to acquire a pointer to the ROT; this allows future implementations of IBindCtx to modify binding behavior. Note that you must also implement the IROTData interface on your moniker class in order to enable your monikers to be registered with the ROT.

Members

The IRunningObjectTable interface inherits from the IUnknown interface. IRunningObjectTable also has these types of members:

Methods

The IRunningObjectTable interface has these methods.

MethodDescription
EnumRunning

Creates and returns a pointer to an enumerator that can list the monikers of all the objects currently registered in the running object table (ROT).

GetObject

Determines whether the object identified by the specified moniker is running, and if it is, retrieves a pointer to that object.

GetTimeOfLastChange

Retrieves the time that an object was last modified.

IsRunning

Determines whether the object identified by the specified moniker is currently running.

NoteChangeTime

Records the time that a running object was last modified.

Register

Registers an object and its identifying moniker in the running object table (ROT).

Revoke

Removes an entry from the running object table (ROT) that was previously registered by a call to IRunningObjectTable::Register.

 

Remarks

The ROT contains entries of the following form: (pmkObjectName, pUnkObject).

The pmkObjectName element is a pointer to the moniker that identifies the running object. The pUnkObject element is a pointer to the running object itself. During the binding process, monikers consult the pmkObjectName entries in the ROT to see whether an object is already running.

Objects that can be named by monikers must be registered with the ROT when they are loaded and their registration must be revoked when they are no longer running.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IRunningObjectTable is defined as 00000010-0000-0000-C000-000000000046

See also

GetRunningObjectTable
IBindCtx::GetRunningObjectTable
IROTData

 

 

Community Additions

ADD
Show:
© 2014 Microsoft