If i have a entry id, how could i get its IABContainer?

  • Thread starter ryotyankou via OfficeKB.com
  • Start date
R

ryotyankou via OfficeKB.com

I get the item entry id as follow:
1. Use IAddrBook::GetSearchPath get SRowSet.
2. Use PropFindProp check SRowSet for IABContainer PR_ENTRYID.
3. Use IAddrBook::OpenEntry open the entry id to get IABContainer.
4. Use IABContainer::GetContentsTable to get contact table.
5. Then i get wanted items in table and save their entry ids.
Now i have the item entry id, if i want to remove the item, i should call
IABContainer::DeleteEntries, but how could i get IABContainer then?
 
D

Dmitry Streblechenko

Which address entry are yo utryign to delete? Is it one of the OAB entries?
The nyou need to delete the underliying IMessage message or remove the
particular address related properties.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
R

ryotyankou via OfficeKB.com

4. Use IABContainer::GetContentsTable to get contact table.
Here, what exactly the item(call it as THIS_ENTRY_ID) in the table is(by
check PR_ENTRY)? IMailUser, IDistList. am i right?
Then IAddrBook::OpenEntry to open the got entry id, what's returned by last
parameter? IMessage, am i right?

And what's the affiliation between contact in Contact folder and
THIS_ENTRY_ID. And contact in contact folder can have three emailaddress, are
the three objects just THIS_ENTRY_ID.

My purpose is quite simple, update contact infos include emailaddress1,
emailaddress2 and emailaddress3. If user set one of them as empty, delete the
address in contact and delete associated "item" in addressbook. That's all.
please help!

Dmitry said:
Which address entry are yo utryign to delete? Is it one of the OAB entries?
The nyou need to delete the underliying IMessage message or remove the
particular address related properties.
I get the item entry id as follow:
1. Use IAddrBook::GetSearchPath get SRowSet.
[quoted text clipped - 4 lines]
Now i have the item entry id, if i want to remove the item, i should call
IABContainer::DeleteEntries, but how could i get IABContainer then?
 
D

Dmitry Streblechenko

4. You will get back IMailUser.
The entry id of that IMailUser embeds the entry id of the corresponding
IPM.Contact IMessage as well an an index (1, 2, 3) that indicates which
email address it corresponds to.
You will need to extract IMessage entry id from the IMailuser entry id, open
the IPM.Contact message using IMAPISession::OpenEntry and update the
relevant fields.


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
ryotyankou via OfficeKB.com said:
4. Use IABContainer::GetContentsTable to get contact table.
Here, what exactly the item(call it as THIS_ENTRY_ID) in the table is(by
check PR_ENTRY)? IMailUser, IDistList. am i right?
Then IAddrBook::OpenEntry to open the got entry id, what's returned by
last
parameter? IMessage, am i right?

And what's the affiliation between contact in Contact folder and
THIS_ENTRY_ID. And contact in contact folder can have three emailaddress,
are
the three objects just THIS_ENTRY_ID.

My purpose is quite simple, update contact infos include emailaddress1,
emailaddress2 and emailaddress3. If user set one of them as empty, delete
the
address in contact and delete associated "item" in addressbook. That's
all.
please help!

Dmitry said:
Which address entry are yo utryign to delete? Is it one of the OAB
entries?
The nyou need to delete the underliying IMessage message or remove the
particular address related properties.
I get the item entry id as follow:
1. Use IAddrBook::GetSearchPath get SRowSet.
[quoted text clipped - 4 lines]
Now i have the item entry id, if i want to remove the item, i should
call
IABContainer::DeleteEntries, but how could i get IABContainer then?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top