Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the global ID of the item.
HRESULT SetGlobalId(
const BYTE * pbGlobalId);
Parameters
- pbGlobalId
[in] The global ID.
Return Value
S_OK
E_POINTER
E_OUTOFMEMORY
E_UNEXPECTED when the global ID has already been set.
Remarks
The format of the global ID must conform to the ID format schema specified when the replica was initialized.
A valid and unique global ID value is required for every IItemMetadata entry before it can be saved to the metadata store. If IReplicaMetadata::SaveItemMetadata is called when the global ID is not valid, IReplicaMetadata::SaveItemMetadata returns SYNC_E_METADATA_PRIMARY_KEY_CONSTRAINT.
Note
This method does not save the change to the store. IReplicaMetadata::SaveItemMetadata must be called to save all changes that have been made to the IItemMetadata properties.