View Single Post
  #2  
Old September 10th 06, 01:55 PM posted to microsoft.public.outlook.program_addins
Ahmed Al-Lakani
external usenet poster
 
Posts: 2
Default 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:lCategoryColorBlue,
Outlook:lCategoryShortcutKeyNone , &pCat);
}
}

Ads