IReplicaMetadata::ReportLiveItemByIndexedFields
Reports that the item that is identified by the indexed field value is active and should not be considered deleted.
HRESULT ReportLiveItemByIndexedFields(
LPCWSTR * ppcszCustomFieldNames,
IFieldValue ** ppFieldValues,
BYTE cCustomFields);
Parameters
- ppcszCustomFieldNames
[in, size_is(cCustomFields)] The set of indexed field names that define the items to report as active.
- ppFieldValues
[in, size_is(cCustomFields)] The set of indexed field values that define the items to report as active. These values must be in the same order as the names in ppcszCustomFieldNames.
- cCustomFields
[in] The number of entries in ppcszCustomFieldNames and in ppFieldValues.
Return Value
S_OK
E_POINTER
SYNC_E_METADATA_QUERY_REQUIRES_INDEXED_FIELDS if a field in ppcszCustomFieldNames was not specified as an index field when the metadata was initialized.
SYNC_E_METADATA_FIELD_INVALID_NAME if a field name in ppcszCustomFieldNames does not exist.
SYNC_E_METADATA_FIELD_INVALID_TYPE if a field value in ppFieldValues does not match the type of the corresponding field.
SYNC_E_METADATA_ITEM_NOT_FOUND if no matching item is found in the metadata store.
Remarks
This method is part of the delete detection service. An item is marked as active in the metadata store when IReplicaMetadata::SaveItemMetadata was called for a changed item, or when IReplicaMetadata::ReportLiveItemByIndexedFields or IReplicaMetadata::ReportLiveItemByGlobalId was called for an unchanged but still active item. A provider can call IReplicaMetadata::GetUnreportedItems
or IReplicaMetadata::GetUnreportedItemsByIndexedFields to get items that exist in the metadata store that are not reported as active. The provider can then mark these items as deleted in the metadata store.