ISyncMetadataStoreSerializer::GetSerializedReplicaId

Returns the replica ID for the replica whose metadata was serialized to the specified destination stream.

Syntax

HRESULT GetSerializedReplicaId(
  IStream * pStream,
  BYTE * pbReplicaId,
  DWORD * pcbReplicaId,
  ID_PARAMETERS * pIdParameters);

Parameters

  • pStream
    [in] The stream that contains the serialized metadata for a particular replica.

  • pbReplicaId
    [in, out, unique, size_is(*pcbReplicaId)] Returns the ID of the replica that is associated with this metadata.

  • pcbReplicaId
    [in, out] Specifies the number of bytes in pbReplicaId. Returns the required number of bytes for pbReplicaId when pbReplicaId is too small, or the number of bytes written to pbReplicaId when data is written.

  • pIdParameters
    [out] An ID_PARAMETERS Structure that specifies format settings, such as the replica ID format, for the provider whose metadata is serialized.

Return Value

  • S_OK.

  • E_OUTOFMEMORY.

  • E_POINTER.

  • SYNC_E_INVALIDOPERATION if the method is called without an open metadata store.

  • SYNC_E_METADATA_STORE_DESERIALIZATION_ERROR if any file format errors are encountered during deserialization.

  • HRESULT_FROM_WIN32(ERROR_MORE_DATA) if pbReplicaId is too small. In this situation, pcbReplicaId returns the number of bytes required.

Remarks

The metadata store must be opened before this method is called. Open a store by calling ISqlSyncMetadataStore::OpenStore or ISqlSyncMetadataStore::CreateStore. Calling this method without first opening the store results in an error return value.

See Also

Reference

ISyncMetadataStoreSerializer Interface