Contents Index Topic Contents | ||
Previous Topic: IAddrBook::RecipOptions Next Topic: IAddrBook::SaveChanges |
IAddrBook::ResolveName
HRESULT ResolveName( ULONG ulUIParam, ULONG ulFlags, LPTSTR lpszNewEntryTitle, LPADRLIST lpAdrList );Resolves a partial recipient list to full addresses.
- Returns one of the following values:
S_OK The name resolution process succeeded. MAPI_E_AMBIGUOUS_RECIP At least one recipient in the lpAdrList parameter matched more than one entry in the address book. Usually, this value is returned when the MAPI_DIALOG flag is set, prohibiting the display of a dialog box. MAPI_E_NOT_FOUND At least one recipient in the lpAdrList parameter cannot be resolved. Usually, this value is returned when the MAPI_DIALOG flag is set, prohibiting the display of a dialog box.
- ulUIParam
- Handle of the parent window.
- ulFlags
- MAPI_DIALOG flag. Displays a dialog box to prompt the user for additional name-resolution information. If this flag is not set, no dialog box is displayed.
- lpszNewEntryTitle
- Pointer to text for the title of the control in the dialog box that prompts the user to enter a recipient. The lpszNewEntryTitle parameter can be NULL.
- lpAdrList
- On input, the address list the list of recipients to resolve. On output, contains the list of resolved recipients.
This method optionally displays a dialog box if ambiguous matches are found. ResolveName goes through the address list passed in the lpAdrList parameter, finds all the names not yet resolved, resolves them, and returns the appropriately modified address list. The address list passed in can be one created using the Address method. If a recipient is ambiguous and the MAPI_DIALOG flag is not specified, ResolveName returns MAPI_E_AMBIGUOUS_RECIP.
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.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.