IContactProperties::GetPropertyCollection method (icontact.h)

Returns an IContactPropertyCollection for the current contact. Optionally, filters the IContactPropertyCollection to enumerate only some values.

Syntax

HRESULT GetPropertyCollection(
  [out] IContactPropertyCollection **ppPropertyCollection,
  [in]  DWORD                      dwFlags,
  [in]  LPCWSTR                    pszMultiValueName,
  [in]  DWORD                      dwLabelCount,
  [in]  LPCWSTR []                 ppszLabels,
  [in]  BOOL                       fAnyLabelMatches
);

Parameters

[out] ppPropertyCollection

Type: IContactPropertyCollection**

On success, points to the new IContactPropertyCollection.

[in] dwFlags

Type: DWORD

Must be CGD_DEFAULT.

[in] pszMultiValueName

Type: LPCWSTR

Specifies the name of the collection (for example: emailAddresses or [namespace]arrayNode). If NULL, all collections are searched for ppszLabels.

[in] dwLabelCount

Type: DWORD

Specifies the number of labels in ppszLabels. If zero, all subproperties with labels are returned.

[in] ppszLabels

Type: LPCWSTR

Specifies an array of string labels to test for. All labels in the array must be set to a valid string (not NULL).

[in] fAnyLabelMatches

Type: BOOL

TRUE if the presence of any label on a given property matches the property. FALSE if all labels must be present to match the property.

Return value

Type: HRESULT

Returns one of the following values:

Return code Description
S_OK
Always returns success.

Remarks

Caller can enumerate all child properties of a top-level property with an optional label filter applied. For example: all emailAddresses where label="work". On success, collection has been reset to the location before the first element (if any are present). Call Next to begin querying data.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header icontact.h (include Contact.h)
DLL Wab32.dll (Version 6.0 or later)