IContactProperties::GetPropertyCollection method

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

Syntax

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

Parameters

ppPropertyCollection

Type: IContactPropertyCollection**

On success, points to the new IContactPropertyCollection.

dwFlags

Type: DWORD

Must be CGD_DEFAULT.

pszMultiValueName

Type: LPCWSTR

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

dwLabelCount

Type: DWORD

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

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).

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

   
Windows version Windows Vista [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header icontact.h (include Contact.h)
DLL Wab32.dll (Version 6.0 or later)