COM question on Outlook.

  • Thread starter Thread starter Semut
  • Start date Start date
S

Semut

Hello,

Below are my codes,

LPDISPATCH lp = getFromSomewhere();
CComQIPtr < Outlook::_MailItem > spMail(lp);
spMail->Delete();

Do I need to call the lp->Release(); ? But the Outlook has already
deleted the item.
 
Yes. Outlook has deleted the MAPI message, but the OOM COM wrapper (spMail)
is still alive, even if it is no longer backed up by a physical MAPI
message.

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

Dmitry Streblechenko (MVP) said:
Yes. Outlook has deleted the MAPI message, but the OOM COM wrapper
(spMail)
is still alive, even if it is no longer backed up by a physical MAPI
message.

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

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

Back
Top