Share via


IABContainer::ResolveNames method

Resolves entries against the address book container.

Syntax

HRESULT ResolveNames(
   SPropTagArray *lpPropTagArray,
   ULONG         ulFlags = ,
   ADRLIST       *lpAdrList,
   FlagList      *lpFlagList
);

Parameters

lpPropTagArray

Type: SPropTagArray*

Pointer to a variable of type SPropTagArray that specifies the set of properties to be included in the returned ADRLIST. Pass NULL to return the default columns.

ulFlags

Type: ULONG

Value of type ULONG that specifies flags affecting functionality.

(0)

Default.

WAB_IGNORE_PROFILES

Enables the caller to resolve names against the whole WAB, not just against the current container, during profile-enabled sessions. The flag can be useful when you need to bypass profiles and containers.

lpAdrList

Type: ADRLIST*

Pointer to a variable of type ADRLIST that specifies the address list of entries whose names need to be resolved. On output, lpFlagList receives the list of resolved names.

lpFlagList

Type: FlagList*

Pointer to a variable of type FLAGLIST that receives an array of input-output 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 was resolved, but was not resolved to a unique entry identifier. If this flag is returned, other containers must ignore this entry in further resolution.

MAPI_RESOLVED

Indicates that the corresponding entry has been resolved to a unique entry identifier. If this flag is returned, other containers must ignore this entry in further resolution.

MAPI_UNRESOLVED

Indicates that the corresponding entry is unresolved. Another container can attempt to resolve this entry.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IABContainer::ResolveNames uses the address list passed in lpAdrList in attempting 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 client uses the array of flags retrieved by IABContainer::ResolveNames in lpFlagList to track the results of the name resolution operation. The array indicates whether each entry name is resolved, unresolved, or matches more than one entry. If the container can uniquely match any unresolved entry, IABContainer::ResolveNames sets the flag for that entry in lpFlagList to MAPI_RESOLVED. IABContainer::ResolveNames also adds the PR_ENTRYID property for that entry to the entry's ADRENTRY structure in the address list in lpAdrList. If a container holds more than one entry that matches a given unresolved entry, IABContainer::ResolveNames sets the flag for the unresolved entry in lpFlagList to MAPI_AMBIGUOUS and leaves that entry's ADRENTRY unchanged.

If IABContainer::ResolveNames cannot retrieve all of the properties requested for an unresolved entry, and these properties do not exist in the ADRENTRY structure passed in, IABContainer::ResolveNames sets the property type of each property not retrieved 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 the ADRLIST must be allocated separately, NOT allocated with AllocateMore. When IABContainer::ResolveNames replaces an entry, it uses FreeBuffer to eliminate the ADRENTRY and AllocateBuffer to create a new one.

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Product
Internet Explorer 4.0
Header
Wabtmp.h
DLL
Wab32.dll