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