How to get current IMAPIFolder? (MS Outlook 2000 )

A

Antonio Casilias

Hello.

I need to get current IMAPIFolder and this is my code:

CComPtr<IMAPIFolder> CConnect::GetCurrentIMAPIFolder()
{
CComPtr<Outlook::MAPIFolder> MFolder;
m_spExplorer->get_CurrentFolder(&MFolder);
if (MFolder == NULL)
return NULL;
return CComQIPtr<IMAPIFolder, &IID_IMAPIFolder>(MFolder->MAPIOBJECT);
}
My addin works proper in MS Outlook2003, but it crashes in MS Outlook2000.

Could you advice me how to avoid Outlook 2000 crash?

Sorry, for my bad english.
Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top