Share via


IItemMetadata::SetFieldByteArray

Sets the value of a byte array field.

HRESULT SetFieldByteArray(
  LPCWSTR pcszFieldName,
  BYTE * pbValue,
  ULONG cbValue);

Parameters

  • pcszFieldName
    [in, string] The name of the field.
  • pbValue
    [in, unique, size_is(cbValue)] The value of the field.
  • cbValue
    [in] The number of bytes in pbValue.

Return Value

  • S_OK.

  • E_POINTER.

  • E_INVALIDARG.

  • SYNC_E_METADATA_FIELD_INVALID_NAME if the field does not exist.

  • SYNC_E_METADATA_FIELD_INVALID_TYPE if the field is not the byte array type.

Remarks

The field value can be reset to an empty value by specifying NULL for pbValue and 0 for cbValue. If pbValue is set to NULL but cbValue is not 0 or if cbValue is 0 and pbValue is not NULL, E_INVALIDARG is returned.

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.

See Also

Reference

IItemMetadata Interface