ISyncMetadataStore::GetReplicaMetadata

Gets the IReplicaMetadata object that represents the metadata for a particular replica.

HRESULT GetReplicaMetadata(
  BYTE * pbReplicaId,
  ID_PARAMETERS * idParameters,
  IReplicaMetadata ** ppReplicaMetadata);

Parameters

  • pbReplicaId
    [in] The replica ID for which replica metadata will be retrieved.
  • idParameters
    [in] The ID format schema for the provider.
  • ppReplicaMetadata
    [out] Returns the metadata for the replica.

Return Value

  • S_OK

  • E_POINTER

  • E_OUTOFMEMORY

  • E_UNEXPECTED if the metadata store has not yet been opened.

  • SYNC_E_METADATA_REPLICA_NOT_FOUND when metadata does not exist for the specified replica ID.

  • SYNC_E_IDFORMATMISMATCH when the ID format schema does not match the ID format schema specified when the replica metadata was initialized.

  • SYNC_E_METADATA_REPLICA_IN_USE when an instance of this replica metadata object is already active.

Remarks

To prevent applications from making concurrent conflicting updates to the metadata store, multiple outstanding instances of IReplicaMetadata for a particular replica ID are not allowed. Applications can access the same IReplicaMetadata object from multiple threads, but multiple processes cannot access the same replica metadata at the same time. If an outstanding instance of IReplicaMetadata for a particular replica ID already exists, this method returns SYNC_E_METADATA_REPLICA_IN_USE.

See Also

Reference

ISyncMetadataStore Interface