COM question on Outlook.

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.
 
D

Dmitry Streblechenko \(MVP\)

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
 
S

Semut

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
 
Top