Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Problems while adding new Category in Outlook 2007 (http://www.outlookbanter.com/add-ins-outlook/26570-problems-while-adding-new-category.html)

Ahmed Al-Lakani September 10th 06 01:46 PM

Problems while adding new Category in Outlook 2007
 
I got a problem in my outlook add-in developed by C++,
While adding new category, I’m trying to add a new Category so I can later
on assign it to my newly created appointment,

My Code as the following

Outlook::Categories *pCats = NULL;
Outlook::Category *pCat = NULL;
HRESULT hRes = E_FAIL;


if(m_pNameSpace != NULL)
{
// get list of categoreies
hRes = m_pNameSpace-get_Categories(&pCats);

if(hRes == S_OK && pCats != NULL)
{
hRes = pCats-Add(BSTR("my new Category"), Outlook::olCategoryColorBlue,
Outlook::olCategoryShortcutKeyNone , &pCat);
}
}


Ahmed Al-Lakani September 10th 06 01:55 PM

Problems while adding new Category in Outlook 2007
 
Sorry, i didn't write the rest of the problem
While pCats-Add been called, it throws an exception,
The exception error message is

“Run-Time Check Failure #0 - The value of ESP was not properly saved across
a function call. This is usually a result of calling a function declared
with one calling convention with a function pointer declared with a different
calling convention.”

Could any body help


"Ahmed Al-Lakani" wrote:

I got a problem in my outlook add-in developed by C++,
While adding new category, I’m trying to add a new Category so I can later
on assign it to my newly created appointment,

My Code as the following

Outlook::Categories *pCats = NULL;
Outlook::Category *pCat = NULL;
HRESULT hRes = E_FAIL;


if(m_pNameSpace != NULL)
{
// get list of categoreies
hRes = m_pNameSpace-get_Categories(&pCats);

if(hRes == S_OK && pCats != NULL)
{
hRes = pCats-Add(BSTR("my new Category"), Outlook::olCategoryColorBlue,
Outlook::olCategoryShortcutKeyNone , &pCat);
}
}



All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2006 OutlookBanter.com