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
 
Back
Top