Compartir a través de


IBindCtx::GetRunningObjectTable (Compact 2013)

3/26/2014

This method provides an interface pointer to the Running Object Table for the computer on which this bind context is running.

The IBindCtx::GetRunningObjectTable method is supported in DCOM, but it is not supported in COM.

Calling this method in COM returns a value of E_NOTIMPL.

Syntax

HRESULT GetRunningObjectTable(
  IRunningObjectTable** pprot
);

Parameters

  • pprot
    [out] Address of the IRunningObjectTable* pointer variable that receives the interface pointer to the Running Object Table.

    If an error occurs, *pprot is set to NULL.

    If *pprot is non-NULL, the implementation calls the IUnknown::AddRef method on the running table object.

    It is the caller's responsibility to call the IUnknown::Release method.

Return Value

The following table shows the return values for this method.

Value

Description

E_OUTOFMEMORY

A standard return value.

CO_E_NOTINITIALIZED

CoInitialize was not called.

E_NOTIMPL

This method is not implemented.

S_OK

A pointer to the Running Object Table was returned successfully.

Remarks

The Running Object Table is a globally accessible table on each machine. It keeps track of all the objects that are currently running on the machine.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Callers

Typically, those implementing a new moniker class (through an implementation of IMoniker interface) call IBindCtx::GetRunningObjectTable.

It is useful to call this method in an implementation of the IMoniker::BindToObject or IMoniker::IsRunning method to check whether a given object is currently running.

You can also call this method in the implementation of the IMoniker::GetTimeOfLastChange method to learn when a running object was last modified.

Moniker implementations should call this method instead of using the GetRunningObjectTable function.

Requirements

Header

objidl.h,
objidl.idl

Library

ole32.lib,
uuid.lib

See Also

Reference

IBindCtx
GetRunningObjectTable
IMoniker
IRunningObjectTable
IMoniker::BindToObject
IMoniker::GetTimeOfLastChange
IMoniker::IsRunning
IUnknown::AddRef
IUnknown::Release