View Single Post
  #1  
Old February 26th 09, 03:18 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default How to specify the "current entry id" to GetItemFromID?

Hi, Dmitry, Thank you for your help. This is not a new problem, but unsolved
one.
It's written by VC2005/ATL, an outlook plugin.
(Outlook::ApplicationEvents_11), 0x0000FAB5, OnNewMailEx
void __stdcall CXXX::OnNewMailEx(BSTR EntryId)
{
//Codes to get m_NameSpacePtr;
Outlook::_MailItemPtr NewMailItem = m_NameSpacePtr-GetItemFromID(_bstr_t
(EntryId));
}
Can this code get all current entryid? If the income e-mail is not encrypted,
the GetItemFromID can get _MailItemPtr normally. Or it will return NULL. As
you mentioned, "Are you sure you specify the right entry id? Do you get an
error? I don't think GetItemFromID can ever return null rather
than raise an exception. " But here the EntryId is pass in by Outlook, and
never be changed, What should i do with the pass-in paramater EntryId, is
there a way to make it 'current' and then pass to GetItemFromID to get the
_MailItemPtr even it is encrypted Mail item??

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200902/1

Ads