how to get contact from message recipients table?

  • Thread starter Thread starter robert dugal
  • Start date Start date
R

robert dugal

Using extended MAPI I need to determine how I can get the contact item
for each recipient of a message. I have custom properties stored in
each contact and I need to access them in
IExchExtMessageEvents::OnWriteComplete().

I get the PR_ENTRYID for each recipient from the message's recipient
table
but I cannot seem to open the contact item, OpenEntry() returns
MAPI_E_INVALID_ENTRYID.
 
Using extended MAPI I need to determine how I can get the contact item
for each recipient of a message. I have custom properties stored in
each contact and I need to access them in
IExchExtMessageEvents::OnWriteComplete().

I get the PR_ENTRYID for each recipient from the message's recipient
table
but I cannot seem to open the contact item, OpenEntry() returns
MAPI_E_INVALID_ENTRYID.

I looked at the two PR_ENTRYID with Outlookspy and the last 24 bytes
of the recipient PR_ENTRYID is the same as the contact PR_ENTRYID. So
it looks like a hack would be to take the last 24 bytes. Is there any
safer way to accomplish the same thing?
 
Back
Top