Compartilhar via


IRunningObjectTable::NoteChangeTime

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method records the time that a running object was last modified. The object must have previously been registered with the Running Object Table (ROT). This method stores the time of last change in the ROT.

Syntax

HRESULT NoteChangeTime(
  DWORD dwRegister,
  FILETIME* pfiletime 
);

Parameters

  • pfiletime
    [in] Pointer to a FILETIME structure containing the object's last change time.

Return Value

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

  • S_OK
    The change time was recorded successfully.

Remarks

The time recorded by this method can be retrieved by calling IRunningObjectTable::GetTimeOfLastChange.

This method is provided to enable a program to check whether a connection between two objects (represented by one object holding a moniker that identifies the other) is up-to-date.

For example, if one object is holding cached information about the other object, this method can be used to check whether the object has been modified since the cache was last updated. See IMoniker::GetTimeOfLastChange.

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::NoteChangeTime method whenever your objects are modified.

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

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.

When an object is first registered in the ROT, the ROT records its last change time as the value returned by calling IMoniker::GetTimeOfLastChange on the moniker being registered.

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

Reference

IRunningObjectTable::GetTimeOfLastChange
IMoniker::GetTimeOfLastChange