Platform SDK: MAPI |
Checking names is the process of using the MAPIResolveName function to take a recipient's display name — usually the recipient's real name or something derived from the real name — or partial display name and retrieve the address book entry corresponding to it.
To check names
Call the MAPIResolveName function. You can allow the display of address dialog boxes while resolving the name by setting the MAPI_DIALOG flag in the flFlags parameter. If the MAPI_DIALOG flag is not set and the recipient's display name resolves to more than one address book entry, MAPIResolveName will return the MAPI_E_AMBIG_RECIP error value.
If the MAPI_DIALOG flag is set, Simple MAPI will display a dialog box for the user to resolve the ambiguity. If the MAPI_AB_NOMODIFY flag is also set, the properties of addresses displayed in this dialog box will not be modifiable, even if the addresses are stored in the user's personal address book.
Like the MAPIAddress function, a successful call to MAPIResolveName produces a buffer containing one or more MapiRecipDesc structures that must be released with a call to the MAPIFreeBuffer function.