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. |
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
- dwRegister
-
[in] Value identifying the ROT entry of the changed object. This value was previously returned by IRunningObjectTable::Register.
- pfiletime
-
[in] Pointer to a FILETIMEstructure 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::NoteChangeTimemethod whenever your objects are modified.
You must have previously called IRunningObjectTable::Registerand 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::GetTimeOfLastChangeon 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 |