API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

PIM_ICONTACTSRECORD_GETFIELDVALUE()

Brew Release
Brew MP 1.0.2
See Also
pim_IContactsRecord_SetFieldValue()
Description
This method retrieves the value of the field specified by the key from the IContactsRecord object. The value is returned as a NULL-terminated UTF-16 encoded wide string.
This method always returns the total size of the buffer required for the complete field value plus a terminating NULL character through the pnValueLenReq parameter. The size is to be interpreted as the number of UTF-16 encoded AECHARs required for the complete, NULL-terminated field data. If this method is called with a non-0 valueLen it will fill the specified buffer with as much of the field value that will fit and NULL-terminate the result. The caller is responsible for providing a valid buffer and an accurate buffer size in this case.
On return, the caller must verify that the field value was properly retrieved by checking that no error code was returned. The caller may also wish to verify that the complete field value was returned in the buffer by comparing the value passed in for valueLen with the value returned in he valueLenReq parameter.
Prototype
  •    AEEResult pim_IContactsRecord_GetFieldValue(
          pim_IContactsRecord *pif,
          const char *key,
          AECHAR *value, 
          int valueLen, 
          int *valueLenReq);
    
Return
  • AEE_SUCCESS on success
    AEE_EBADITEM if the requested field does not exist
    AEE_EUNSUPPORTED if the operation isn't supported by the implementation
    Error code otherwise.
Side Effect
  • None
Comments
None