IConstructReplicaKeyMap::FindOrAddReplica method (winsync.h)

Adds entries to or finds entries in an IReplicaKeyMap object.

Syntax

HRESULT FindOrAddReplica(
  [in]  const BYTE *pbReplicaId,
  [out] DWORD      *pdwReplicaKey
);

Parameters

[in] pbReplicaId

The ID of the replica to add or find.

[out] pdwReplicaKey

The key of the replica in the map. If an entry for pbReplicaId does not exist in the map, an entry is created and a new key is assigned to it.

Return value

The possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
S_OK
The method succeeded.
E_POINTER
Invalid pointer.
SYNC_E_ID_FORMAT_MISMATCH
pbReplicaId is not of the format that the provider specified.

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

See also

IConstructReplicaKeyMap Interface