R
ryotyankou via OfficeKB.com
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??
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??