IRunningObjectTable::GetTimeOfLastChange method

Retrieves the time that an object was last modified.

Syntax


HRESULT GetTimeOfLastChange(
  [in]  IMoniker *pmkObjectName,
  [out] FILETIME *pfiletime
);

Parameters

pmkObjectName [in]

A pointer to the IMoniker interface on the moniker.

pfiletime [out]

A pointer to a FILETIME structure that receives the object's last change time.

Return value

This method can return the following values.

Return codeDescription
S_OK

The method completed successfully.

S_FALSE

There is no entry for pmkObjectName in the ROT, or that the object it identifies is no longer running (in which case, the entry is revoked).

 

Remarks

This method returns the change time that was last reported for this object by a call to IRunningObjectTable::NoteChangeTime. If NoteChangeTime has not been called previously, the method returns the time that was recorded when the object was registered.

This method is provided to enable checking 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.

Notes to Callers

Generally, you call GetTimeOfLastChange only if you are writing your own moniker class (that is, implementing the IMoniker interface). You typically call this method from your implementation of IMoniker::GetTimeOfLastChange. However, you should do so only if the pmkToLeft parameter of IMoniker::GetTimeOfLastChange is NULL. Otherwise, you should call IMoniker::GetTimeOfLastChange on your pmkToLeft parameter instead.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IRunningObjectTable is defined as 00000010-0000-0000-C000-000000000046

See also

IMoniker::GetTimeOfLastChange
IRunningObjectTable

 

 

Show: