IItemMetadata::SetFieldUInt16

Sets the value of a 16-bit unsigned integer field.

HRESULT SetFieldUInt16(
  LPCWSTR pcszFieldName,
  USHORT value);

Parameters

  • pcszFieldName
    [in, string] The name of the field.
  • value
    [out, retval] The value of the field.

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 when the field is not the 16-bit unsigned integer type.

Remarks

Custom fields must be defined by using a CUSTOM_FIELD_DEFINITION structure when the replica metadata is first initialized.

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