IContactProperties::SetLabels Method

Appends the set of labels passed in to the specified property's label set. Note: This method does not check for duplicate labels.

Syntax

HRESULT SetLabels(      
    LPCWSTR pszArrayElementName,
    DWORD dwFlags,
    DWORD dwLabelCount,
    LPCWSTR ppszLabels
);

Parameters

  • pszArrayElementName
    [in] Specifies the property to label.
  • dwFlags
    [in] Must be CGD_DEFAULT.
  • dwLabelCount
    [in] Specifies the count of labels in array.
  • ppszLabels
    [in]  Specifies an array of LPCWSTR labels.

Return Value

Returns one of the following values:

S_OK Labels set successfully.
ERROR_PATH_NOT_FOUND No data found for this property name.
ERROR_INVALID_DATATYPE Unable to set value for this property due to schema.