Partager via


IRunningObjectTable::Revoke (Windows Embedded CE 6.0)

1/6/2010

This method removes from the Running Object Table (ROT) an entry that was previously registered by a call to IRunningObjectTable::Register.

Syntax

HRESULT Revoke(
  DWORD dwRegister 
);

Parameters

  • dwRegister
    [in] Value identifying the ROT entry to revoke. This value was previously returned by IRunningObjectTable::Register.

Return Value

This method supports the standard return value E_INVALIDARG, as well as the following:

  • S_OK
    The object's registration was successfully revoked.

Remarks

This method undoes the effect of a call to IRunningObjectTable::Register, removing both the moniker and the pointer to the object identified by that moniker.

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

Notes to Callers

If you are a moniker provider (that is, you hand out monikers identifying your objects to make them accessible to others), you must call the IRunningObjectTable::Revoke method to revoke the registration of your objects when they stop running.

You must have previously called IRunningObjectTable::Register and stored the identifier returned by that method; you use that identifier when calling IRunningObjectTable::Revoke.

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 a container application, you must revoke a document's registration when the document is closed. You must also revoke a document's registration before reregistering it when it is renamed.

If you are writing a server application, you must revoke an object's registration when the object is closed. You must also revoke an object's registration before reregistering it when its container document is renamed (see IOleObject::SetMoniker).

Requirements

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

IRunningObjectTable
IOleObject::SetMoniker
IRunningObjectTable::Register