MAPIRESOLVENAME callback function (mapi.h)
[The use of this function is discouraged. It may be altered or unavailable in subsequent versions of Windows.]
The MAPIResolveName function transforms a message recipient's name as entered by a user to an unambiguous address list entry.
Syntax
MAPIRESOLVENAME Mapiresolvename;
ULONG Mapiresolvename(
[in] LHANDLE lhSession,
[in] ULONG_PTR ulUIParam,
[in] LPSTR lpszName,
[in] FLAGS flFlags,
ULONG ulReserved,
lpMapiRecipDesc *lppRecip
)
{...}
Parameters
[in] lhSession
Handle that represents a Simple MAPI session or zero. If the value of the lhSession parameter is zero, MAPI logs on the user and creates a session that exists only for the duration of the call. This temporary session can be an existing shared session or a new one. If necessary, the logon dialog box is displayed.
[in] ulUIParam
Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal. If the ulUIParam parameter contains a parent window handle, it is of type HWND (cast to a ULONG_PTR). If no dialog box is displayed during the call, ulUIParam is ignored.
[in] lpszName
Pointer to the name to be resolved.
[in] flFlags
Bitmask of option flags. The following flags can be set.
ulReserved
Reserved; must be zero.
lppRecip
Return value
This function returns one of the following values.
Return code | Description |
---|---|
|
The recipient requested has not been or could not be resolved to a unique address list entry. |
|
The recipient could not be resolved to any address. The recipient might not exist or might be unknown. |
|
One or more unspecified errors occurred. The name was not resolved. |
|
There was insufficient memory to proceed. The name was not resolved. |
|
There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. The name was not resolved. |
|
The operation was not supported by the underlying messaging system. |
|
The user canceled one of the dialog boxes. The name was not resolved. |
|
The call succeeded and the name was resolved. |
Remarks
The MAPIResolveName function resolves a message recipient's name (as entered by a user) to an unambiguous address list entry, optionally prompting the user to choose between possible entries, if necessary. A recipient descriptor structure containing fully resolved information about the entry is allocated and returned. The caller should free this MapiRecipDesc structure at some point by calling the MAPIFreeBuffer function. If MAPIResolveName returns an error value, it is not necessary to deallocate memory with MAPIFreeBuffer.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mapi.h |