IABContainer::ResolveNamesIABContainer::ResolveNames*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IABContainer::OpenProperty
*Next Topic: IABContainer::SaveChanges

IABContainer::ResolveNames

HRESULT ResolveNames(
    LPSPropTagArray    lpPropTagArray,
    ULONG              ulFlags,
    LPADRLIST          lpAdrList,
    LPFlagList         lpFlagList
);

Resolves entries against the address book container.

lpPropTagArray
SPropTagArray structure that specifies the set of properties to be included in the returned ADRLIST structure. Pass NULL to return the default columns.
ulFlags
MAPI_UNICODE flag, which indicates the returned strings of the default column set are in Unicode format. If the MAPI_UNICODE flag is not set, the strings are in ANSI format.

Note Must be zero in the first version of Internet Explorer Address Book.

lpAdrList
Input-output parameter that on input points to an ADRLIST structure containing the address list of entries whose names need to be resolved. On output, this parameter returns the list of resolved names.
lpFlagList
Input-output parameter containing an array of flags; each flag corresponds to an entry in lpAdrList and provides the name-resolution status for that particular entry. The flags in the lpFlagList parameter are in the same order as the entries in lpAdrList. The following flags can be set:
MAPI_AMBIGUOUS Indicates that the corresponding entry is resolved, but that it did not resolve to a unique entry identifier. If this flag is returned, other containers should ignore this entry when the lpAdrList is passed to them for further name resolution.
MAPI_RESOLVED Indicates that the corresponding entry has been resolved to a unique entry identifier. If this flag is returned, other containers should ignore this entry in further resolution.
MAPI_UNRESOLVED Indicates that the corresponding entry is unresolved. Another container can attempt to resolve this entry.

This method takes the address list passed in lpAdrList and tries to resolve all the entries that have their corresponding MAPI_UNRESOLVED flag set in lpFlagList. Entries in lpAdrList that lack the PR_ENTRYID property are considered unresolved.

The array of flags this method returns in lpFlagList is used to track the results of the name resolution operation; the array shows for each entry name whether it is resolved or unresolved or matches more than one entry. If, after looking at an unresolved entry, a container can match that entry uniquely, ResolveNames sets the flag for that entry in lpFlagList to MAPI_RESOLVED and adds the PR_ENTRYID property for that entry to that entry's ADRENTRY structure in the address list in lpAdrList. If a container contains more than one entry that matches a given unresolved entry, ResolveNames sets the flag for the unresolved entry in lpFlagList to MAPI_AMBIGUOUS and leaves that entry's ADRENTRY alone.

If the ResolveNames method is unable to return all the properties requested for an unresolved entry, and these properties don't exist in the ADRENTRY structure passed in, it sets the property type of each property not returned to PT_ERROR. Any property columns that are already included for an entry are retained if that entry is resolved.

Note The ADRENTRY items in ADRLIST should be separately allocated, not allocated with AllocateMore. When ResolveNames replaces an entry, it expects to free the ADRENTRY structure by using FreeBuffer and allocate a new one by using AllocateBuffer.

Back to top


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.