V
Vinayakc
Hi all,
I have just seen one abrupt behaviour of Outlook. I wrote one add-in in
VC++. This add-in can work on multiple mail items at a time. Means user
can select more than one mail and thorugh add-in command bar button it
moves all mails to the specific folder.
When I selecte around 200-400 mails in one go, at any point my
queryinterface function from following code throws an exception. I
could not understand this as outlook behaves randomly. Some times it
moves all mails to that folder and sometimes it throws an exception.
Code is :
result = pSelection->Item(vIndex,&pSelectedItem);
if( result != S_OK )
{
LOG_ERR_MESSAGE( _T("Item()") , result );
bRet = FALSE;
goto Error;
}
//Get the selected mail item
result = pSelectedItem->QueryInterface(&spMailItem);
if( result != S_OK )
{
LOG_ERR_MESSAGE( _T("QueryInterface()") , result );
bRet = FALSE;
goto Error;
}
I have debugged it. When exception occurs pSelectedItem is not having
NULL value. So I am not able to understand why this happens. This
application has one more working thread which works on the mailitems
which we move to that particular folder.
Waiting for reply.
Thanks and Regards
Vinayakc
I have just seen one abrupt behaviour of Outlook. I wrote one add-in in
VC++. This add-in can work on multiple mail items at a time. Means user
can select more than one mail and thorugh add-in command bar button it
moves all mails to the specific folder.
When I selecte around 200-400 mails in one go, at any point my
queryinterface function from following code throws an exception. I
could not understand this as outlook behaves randomly. Some times it
moves all mails to that folder and sometimes it throws an exception.
Code is :
result = pSelection->Item(vIndex,&pSelectedItem);
if( result != S_OK )
{
LOG_ERR_MESSAGE( _T("Item()") , result );
bRet = FALSE;
goto Error;
}
//Get the selected mail item
result = pSelectedItem->QueryInterface(&spMailItem);
if( result != S_OK )
{
LOG_ERR_MESSAGE( _T("QueryInterface()") , result );
bRet = FALSE;
goto Error;
}
I have debugged it. When exception occurs pSelectedItem is not having
NULL value. So I am not able to understand why this happens. This
application has one more working thread which works on the mailitems
which we move to that particular folder.
Waiting for reply.
Thanks and Regards
Vinayakc