IRunningObjectTable::Revoke
Removes from
the Running Object Table (ROT) an entry that was previously registered by a
call to IRunningObjectTable::Register
HRESULT Revoke(
DWORD dwRegister |
//Value
identifying registration to be revoked |
); |
|
Parameter
dwRegister
[in] Value
identifying the ROT entry to revoke. This value was previously returned by IRunningObjectTable::Register
Return Values
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
Notes to Callers
If you re 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
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 re 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 re-registering it when it is
renamed.
If you re 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 re-registering it when its
container document is renamed (see IOleObject::SetMoniker).
See Also