Q1: In OnConnection function, the follow code can work. I'm using outlook2003.
Outlook::MAPIFolderPtr pSentFd = m_NSPtr-GetDefaultFolder(Outlook::
olFolderSentMail);
pSentFdItems = pSentFd-GetItems();
ItemsItemAddEvent:

ispEventAdvise(pSentFdItems);
But following couldn't, why?
m_NSPtr-GetFolders(); then loop to search the specified folder, i'm sure i
found the correct folder, then
if(HotPtr != NULL)//HotPtr is the correct MAPIFolderPtr for olFolderSentMail.
{
CComPtrOutlook::_Items HotInboxItems = HotPtr-GetItems();
long ll = HotInboxItems-GetCount();
ItemsItemAddEvent:

ispEventAdvise(HotInboxItems);
}
But the event could not be fired.
Q2: How could i get MailItem of the mail receive from HTTP hotmail? I don't
know how to DispEventAdvise on hotmail's message store(I add a HTTP account
which is MS's hotmail), i use the code above to set event on the folder of
hotmail(and i'm sure the folder is correct folder), but couldn't work. Is
there a way to get hotmail's(INTERSTOR) "Namespace" so that i can get its
folder to set the current advise?
In a word, i want to get the MailItem of HTTP mail from hotmail to process,
is that clear?
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200904/1