IMoniker::GetTimeOfLastChange

HRESULT IMoniker::GetTimeOfLastChange(pbc, pmkToLeft, pfiletime)

Answer the earliest time after which the object pointed to by this moniker is known not to have changed.

The purpose of this function is to support the ability to determine whether higher-level objects based on monikers are up-to-date or not. An example of higher level objects are the link objects in OLE Compound Documents.

The returned time of change is reported using a FILETIME. A FILETIME is a 64-bit value indicating a time in units of 100 nanoseconds, with an origin in 1601.5. A resolution of 100 nanoseconds allows us to deal with very fast-changing data; allocating this many bits gives us a range of tens of thousands of years. It is not expected that most change times in objects will be actually be internally recorded with this precision and range; they only need be reported with such.

If the time of last change is unavailable, either because the deadline was exceeded or otherwise, then it is recommended that a FILETIME of {dwLowDateTime,dwHighDateTime} = {0xFFFFFFFF,0x7FFFFFFF} (note the 0x7 to avoid accidental unsigned / signed confusions) should be passed back. If the deadline was exceeded, then the status MK_E_EXCEEDEDDEADLINE should be returned. If the time of change is unavailable, and would not be available no matter what deadline were used, then MK_E_UNAVAILABLE should be returned. Otherwise, S_OK should be returned.

If pmkToLeft is NULL, then this function should generally first check for a recorded change-time in the Running Object Table with IRunningObjectTable::GetTimeOfLastChange before proceeding with other strategies. Moniker classes that support wildcards will have to take into consideration exactly what does get put in the Running Object Table and look for the appropriate thing; since Generic Composite Monikers know nothing of wildcards, they may even need to do that in the non-NULL pmkToLeft case. See IMoniker::IsRunning.

Argument

Type

Description

pbc

IBindCtx*

The binding context for this operation.

pmkToLeft

IMoniker*

The moniker to the left of this one in the composite in which it is found.

pfiletime

FILETIME*

The place in which the time of last change should be reported.

return value

HRESULT

S_OK, MK_E_EXCEEDEDDEADLINE, MK_E_UNAVAILABLE, MK_E_CONNECTMANUALLY