IMAPISupport::Address

The IMAPISupport::Address method displays the common address dialog box.

Quick Info

See IMAPISupport : IUnknownA6YDUA.

HRESULT Address(

    ULONG FAR * lpulUIParam,

 

    LPADRPARM lpAdrParms,

 

    LPADRLIST FAR * lppAdrList

 

   )

 

 

Parameters

lpulUIParam

[in, out] Handle of the parent window of the dialog box. On input, a window handle must always be passed. On output, if the DIALOG_SDI flag is set in the ADRPARM2EIR215 structure pointed to by the lpAdrParms parameter, then the window handle of the modeless dialog box is returned.

lpAdrParms

[in, out] Pointer to an ADRPARM structure that controls the presentation and behavior of the address dialog box.

lppAdrList

[in, out] Pointer to a pointer to an address list. On input, this list is either the current list of recipients in a message or NULL, if no such list exists. On output, lppAdrList points to an updated list of message recipients.

 

Return Values

S_OK

The address dialog box was successfully displayed.

 

Remarks

The IMAPISupport::Address method is implemented for address book provider support objects. Address book providers call Address to create or update a list of message recipients.

Each recipient is described in an ADRENTRYWLHOWG structure that is included in the ADRLIST16760YG structure pointed to by lppAdrList. The ADRENTRY structure contains an array of recipient property values, one of which is the recipient s type, or PR_RECIPIENT_TYPE1VRJ4HY property. This ADRLIST structure can be passed to a client to use as the lpMods parameter in a call to IMessage::ModifyRecipientsBTAS42.

Each recipient in the ADRLIST structure can either be resolved, indicating that one of its property values is its PR_ENTRYID2JH9H8T property, or unresolved, indicating that the PR_ENTRYID property is missing.

In addition to PR_ENTRYID, resolved recipients include the following properties:

PR_RECIPIENT_TYPE1VRJ4HY

PR_DISPLAY_NAME1KS30YA

PR_ADDRTYPE7C7E4S

PR_DISPLAY_TYPEYIXSE1

 

Unresolved recipients typically include only PR_DISPLAY_NAME1KS30YA and PR_RECIPIENT_TYPE1VRJ4HY.

Notes to Callers

The ADRLIST16760YG structure that the caller passes in might be a different size from the structure that MAPI returns. When allocating memory for the ADRLIST structure, allocate the memory for each SPropValue81C9._8 structure separately.

Use the pointers to the MAPI memory allocation functions passed in to your ABProviderInitDN1VRN function to allocate memory. Allocate memory for the ADRLIST structure and each property value structure within the ADRENTRY structures in the ADRLIST structure with the MAPIAllocateBuffer1MW3BAZ function.

If Address must return a larger ADRLIST structure, or if you have passed NULL for lppAdrList, it frees the original structure and allocates a new one. Address also allocates additional property value structures in the ADRLIST structure and frees old ones as appropriate. For more information about how memory is managed for ADRLIST structures, see Managing Memory for ADRLIST and SRowSet StructuresJEZ06_.

Address returns immediately if the DIALOG_SDI flag was set in the ADRPARM structure in the lpAdrParms parameter.

See Also

ADRENTRY, ADRLIST, ADRPARM, FreePadrlist, FreeProws, IMAPISupport::GetMemAllocRoutines, IMAPITable::QueryRows, IMessage::ModifyRecipients, MAPIAllocateBuffer, MAPIAllocateMore, MAPIFreeBuffer, SPropValue, SRowSet