Share via


ISyncDataConverter::ConvertDataRetrieverFromProviderFormat

Converts the data retriever from the associated provider’s format to the required data retriever format. This method is required only if one or both of the providers in a synchronization session retrieves data by using an interface other than ISynchronousDataRetriever or IAsynchronousDataRetriever.

Syntax

HRESULT ConvertDataRetrieverFromProviderFormat(
  IUnknown * pUnkDataRetrieverIn,
  IEnumSyncChanges * pEnumSyncChanges,
  IUnknown ** ppUnkDataOut);

Parameters

  • pUnkDataRetrieverIn
    [in] The data retriever to be converted.

  • pEnumSyncChanges
    [in] An IEnumSyncChanges object that represents a set of item changes.

  • ppUnkDataOut
    [out] The converted data retriever.

Return Value

  • S_OK.

  • E_NOTIMPL if the data retriever implements one of the built-in interfaces and only data conversion is needed.

  • Developer-defined error values

If an error other than E_NOTIMPL is returned, the synchronization session terminates and returns the error code.

Remarks

Typically, the most efficient way to convert a data retriever is to create a proxy that implements the required data retriever interface and holds a pointer to the provider's data retriever interface. The proxy can then retrieve data from the provider interface as changes are processed during the synchronization session. In some situations, such as remote change application scenarios, you must retrieve all of the changes first, convert them as necessary, and then serialize the data retriever with all the data in it. For these situations, use pEnumSyncChanges to enumerate all of the changes that should be serialized.

See Also

Reference

ISyncDataConverter Interface

Concepts

Converting Data Between Providers