Redemption::ISafeMAPIFolder

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

Semut

CComPtr<Redemption::ISafeMAPIFolder> spSafeMailFolder;
CoCreateInstance ( CLSID_MAPIFolder,
NULL,
CLSCTX_INPROC_SERVER,
IID_ISafeMAPIFolder,
(void**) &spSafeMailFolder );

spSafeMailFolder->put_Item(pMAPIFolder);


The Redemption::ISafeMAPIFolder::put_Item, will it release the pMAPIFolder
when it goes out of the scope since it attached to it? What the put_item do
internally? AddRef the pMAPIFolder or keep a separate copy of Ref count.



thank you.
 
It goes through the standard COM routine - addref's it and stores the
pointer. When SafeMAPIFolder is released (or when you call put_item()
again), it will be released.

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

Dmitry Streblechenko (MVP) said:
It goes through the standard COM routine - addref's it and stores the
pointer. When SafeMAPIFolder is released (or when you call put_item()
again), it will be released.

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