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.
Gets the value of a 16-bit unsigned integer field.
HRESULT TryGetFieldUInt16(
  LPCWSTR pcszFieldName,
  USHORT * pValue);
Parameters
- pcszFieldName
 [in, string] The name of the field.
- pValue
 [out] Returns the value of the specified field.
Return Value
- S_OK 
- S_FALSE if the value has not been set. 
- 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 a 16-bit unsigned integer. 
Remarks
Custom fields must be defined by using a CUSTOM_FIELD_DEFINITION structure when the replica metadata is first initialized.
If IItemMetadata::SetFieldUInt16 was called to set the field value, but the change has not yet been saved by a call to IReplicaMetadata::SaveItemMetadata, TryGetFieldUInt16 returns the value that is contained in the IItemMetadata object and not the value that is stored in the metadata store.