Problems while adding new Category in Outlook 2007

A

Ahmed Al-Lakani

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::eek:lCategoryColorBlue,
Outlook::eek:lCategoryShortcutKeyNone , &pCat);
}
}
 
A

Ahmed Al-Lakani

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
 

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