MAPIDetails (VB)

The Visual Basic MAPIDetails function displays a dialog box containing the details of a selected address-list entry.

Quick Info

Header file:

MAPIVB32.BAS

 

MAPIDetails(

    Session as Long,
    UIParam as Long,
    Recipient as MapiRecip,
    Flags as Long,
    Reserved as Long) as Long

 

Parameters

Session

[in] Session handle that represents a Simple MAPI session or zero. If the value of the Session 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, a logon dialog box is displayed.

UIParam

[in] Parent window handle or zero, indicating that if a dialog box is displayed, it is application modal. If no dialog box is displayed during the call, the UIParam parameter is ignored.

Recipient

[in] Recipient descriptor containing the entry whose details are to be displayed. MAPIDetails ignores all members of the MapiRecip1SE3_GG type except EIDSize and EntryID. If the value of the EIDSize member is non-zero, MAPIDetails resolves the recipient entry. If the value of EIDSize is zero, the MAPI_E_AMBIGUOUS_RECIPIENT value is returned.

Flags

[in] Bitmask of flags. The following flags can be set:

MAPI_AB_NOMODIFY

The caller is requesting that the dialog box be read-only, prohibiting changes. MAPIDetails might or might not honor the request.

MAPI_LOGON_UI

A dialog box should be displayed to prompt the user to log on if required. When the MAPI_LOGON_UI flag is not set, the client application does not display a logon dialog box and returns an error value if the user is not logged on.

MAPI_NEW_SESSION

An attempt should be made to create a new session rather than acquire the environment s shared session. If the MAPI_NEW_SESSION flag is not set, MAPIDetails uses an existing shared session.

Reserved

Reserved; must be zero.

 

Return Values

MAPI_E_AMBIGUOUS_RECIPIENT

The recipient requested has not been or could not be resolved to a unique address list entry.

MAPI_E_FAILURE

One or more unspecified errors occurred. No dialog box was displayed.

MAPI_E_INSUFFICIENT_MEMORY

There was insufficient memory to proceed. No dialog box was displayed.

MAPI_E_INVALID_RECIPS

The recipient specified in the Recipient parameter was unknown. No dialog box was displayed.

MAPI_E_LOGIN_FAILURE

There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No dialog box was displayed.

MAPI_E_NOT_SUPPORTED

The operation was not supported by the underlying messaging system.

MAPI_E_USER_ABORT

The user canceled either the logon dialog box or the details dialog box.

SUCCESS_SUCCESS

The call succeeded and the details dialog box was displayed.

 

Remarks

The MAPIDetails function presents a dialog box that shows the details of a particular address list entry. The display name and address are the minimum attributes that are displayed in the dialog box; more information can be shown depending on the directory to which the entry belongs. The details dialog box cannot be suppressed, but the caller can request that it be read-only or modifiable.

Details can only be shown for resolved address list entries. An entry is resolved if the EIDSize member of the MapiRecip1SE3_GG type is nonzero. Entries are resolved when they are returned by the MAPIAddressUJLCP2 or MAPIResolveName11R2Y0J functions and as the result of being recipients of read mail.

The declaration of this function for the 32-bit Visual Basic runtime is:

MAPIDetails(

ByVal Session&,
ByVal UIParam&,
Recipient As MapiRecip,
ByVal Flags&,
ByVal Reserved&) As Long