Sdílet prostřednictvím


ISyncDataConverter::ConvertDataRetrieverToProviderFormat

Converts the data retriever from an external format to the associated provider’s 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.

HRESULT ConvertDataRetrieverToProviderFormat(
  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 ends and returns the error code.

Remarks

Typically, the most efficient way to convert a data retriever is to create a proxy that implements the provider's data retriever interface and holds a pointer to the external data retriever interface. The proxy can then retrieve data from the external 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