简体   繁体   中英

Modify Recipients for a MAPI message


what i need to do is to backup recipients of MAPI message, and do some modification to the message (which may change the recipients also), after that i want to copy the backed up recipient back to the message again, here is the flow:

message is the MAPI IMessage object
call message->GetRecipientTable, the result is LPMAPITABLE
do changes to message
call message->ModifyRecipients, which takes LPADRLIST

my problem is that i want to take the result LPMAPITABLE and input that into ModifyRecipients, but it takes only LPADRLIST. is there a way to convert that? other than looping LPMAPITABLE and copying one by one?

Use IMAPITable::QueryRows . Or HrQueryAllRows (which wraps IMAPITable::SetColumns/Restrict/QueryRows in a single call). SRowSet can be cast to AdrList - they have the same memory layout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM