IRunningObjectTable::NoteChangeTime (Compact 2013)
3/26/2014
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 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, |
Library |
ole32.lib, |
See Also
Reference
IRunningObjectTable
IRunningObjectTable::GetTimeOfLastChange
IMoniker::GetTimeOfLastChange