ISupportLastWriteTime interface (winsync.h)
Represents a synchronization provider that is able to report the date and time when an item or change unit was last changed. This ability is useful to an application that implements last-writer-wins conflict resolution.
Inheritance
The ISupportLastWriteTime interface inherits from the IUnknown interface. ISupportLastWriteTime also has these types of members:
Methods
The ISupportLastWriteTime interface has these methods.
ISupportLastWriteTime::GetChangeUnitChangeTime Gets the date and time when the specified change unit was last changed. |
ISupportLastWriteTime::GetItemChangeTime Gets the date and time when the specified item was last changed. |
Remarks
This interface is typically implemented by a provider. If a provider implements this interface, it must return a pointer to it when IID_ISupportLastWriteTime is passed to the QueryInterface method of its data transfer interface. The data transfer interface is the interface that a provider returns in response to the ISynchronousDataRetriever::LoadChangeData method.
To implement last-writer-wins conflict resolution, an application typically performs the following steps:
- Registers an ISyncCallback object to receive conflict notifications.
- In the ISyncCallback::OnConflict method, calls IChangeConflict::GetDestinationProviderConflictingData and IChangeConflict::GetSourceProviderConflictingData on the IChangeConflict object to get the data transfer interfaces for the conflicting changes.
- Passes IID_ISupportLastWriteTime to the QueryInterface method of each data transfer interface to get the ISupportLastWriteTime objects that represent the conflicting changes.
- Calls GetItemChangeTime or GetChangeUnitChangeTime on the ISupportLastWriteTime objects to get the last date and time the changes were made.
- Compares the date and time values to determine which change was made last.
- Indicates which change to keep by using the IChangeConflict::SetResolveActionForChange or IChangeConflict::SetResolveActionForChangeUnit method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | winsync.h |