Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/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::Revokemethod to revoke the registration of your objects when they stop running.

You must have previously called IRunningObjectTable::Registerand 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
Windows Mobile Windows Mobile Version 5.0 and later

See Also