Ce mapi example (6)

Source: Internet
Author: User
Next, let's talk about how to obtain the contact information, which is similar to the setting information. The following is an example:

Imapitable * ptable = NULL;

//PassGetrecipienttableGet contact information list

PMSG-> getrecipienttable (null, & ptable );

 

Lpadrlist Precipentrows= NULL;

//Obtain the information of each contact. The procedure can be seen and enumerated here.FolderAnd so on.

While(! Failed (hR = ptable-> queryrows (1, 0, (lpsrowset *) & precipentrows )))

{

If(Precipentrows-> centries = 0)

Break;

 

For (INT n = 0; n <precipentrows-> centries; n ++)

{

//EachEntryRepresents a contact information. Each contact information has multiple attributes.

For(IntI = 0; I <precipentrows-> aentries [N]. cvalues; I ++)

{

//Judge if yesPr_email_addressProperties, then the contact address is found.

If(Pr_email_address = precipentrows-> aentries [N]. rgpropvals [I]. ulproptag)

{

//Contact address

Cstring strcontact= Precipentrows-> aentries [N]. rgpropvals [I]. value. lpszw;

//Subsequent operations

}

}
}

//ReleasePrecipentrowsAnd the content in it. For the release method, see the previous article about setting contact information.

......

}

 

The aboveCodeThe section only demonstrates the basic operation steps for obtaining contact information. You can also familiarize yourself with this example.ImapitableUsage,MapiThere are still many places in it that will use this interface, which is of great use.

 Bored customers

Yzx0023@gmail.com

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.