Partager via


ADRLIST

4/8/2010

The ADRLIST structure describes zero or more properties belonging to one or more recipients.

Syntax

struct { 
  ULONG cEntries; 
  ADRENTRY aEntries[MAPI_DIM]; 
} ADRLIST, FAR *LPADRLIST; 

Members

  • cEntries
    Count of entries in the array specified by aEntries.
  • aEntries
    Array of ADRENTRY structures, one structure for each recipient.

Remarks

An ADRLIST structure contains one or more ADRENTRY structures, each describing the properties of a recipient. A recipient can be unresolved, meaning that it lacks an entry identifier in its array of property values, or resolved, meaning that the PR_ENTRYID property is included. Typically, resolved recipients also have an e-mail address the PR_EMAIL_ADDRESS property. However, the e-mail address is not required. ADRLIST structures are used, for example, to describe the recipient list for an outgoing message and by MAPI to display the entries in the address book.

ADRLIST and SRowSet structures the structures used for representing rows in tables are similarly designed so that they can be used interchangeably. Bothcontain an array of structures describing a group of properties and a count of the values in the array. In the ADRLIST structure, the array contains ADRENTRY structures, and in the SRowSet structure, the array contains SRow structures. Because ADRLIST and SRowSet structures follow the same allocation rules, an SRowSet structure that is retrieved from the contents table of an address book container can be cast to an ADRLIST structure and used as is.

The following diagram illustrates the layout of an ADRLIST structure.

Bb445959.84574713-15d8-436f-8203-582eab20f4cd(en-us,MSDN.10).gif

The ADRENTRY and SPropValue portions in an ADRLIST structure must be allocated and freed independently of the other parts. That is, each SPropValue structure must be allocated individually after memory for the ADRENTRY structure has been allocated and freed before the ADRENTRY structure is freed. This independence in handling memory allows recipients and individual recipient properties to be freely added or deleted from the address list.

The MAPIAllocateBuffer and MAPIFreeBuffer functions must be used to allocate and free the ADRLIST structure and all its parts.

Requirements

Header mapidefs.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

CbADRLIST | CbNewADRLIST | SizedADRLIST

See Also

Reference

ADRENTRY
MAPI Functions
IMessage::ModifyRecipients
SRowSet

Other Resources

Messaging