S
s3ven
Hi all,
I have problem with a function get_ItemProperties. It works on Outlook
2002 and 2003 but generate a debug ESP error ("value of esp was not
properly saved across a function call. This is usually a result of
calling a function with a function pointer declared in a different
calling convention.").
This is the code i used (i get a pointer on a the current select
contact item and try to get its properties)
CComPtr<IDispatch> _selecteditemDisp;
CComPtr<Outlook::_ContactItem> _selecteditem;
HRESULT hr;
hr = _pSelection->Item( CComVariant(1),
(IDispatch**)(&_selecteditemDisp));
if ((SUCCEEDED(hr)) && (_selecteditemDisp!=NULL))
{
hr=_selecteditemDisp->QueryInterface(_uuidof(Outlook::_ContactItem),
(void**)&_selecteditem);
if ((SUCCEEDED(hr)) && (_selecteditem!=NULL))
{
CComPtr<Outlook::ItemProperties> pIP;
_selecteditem->Display(); // this function works correctly in ol2k
pIP.p = NULL; // is it required?
hr =_selecteditem->get_ItemProperties(&pIP); // generate the ESP
error
// do something with pIP...
}
}
I import the corrects olb and dll file (mso9*) for ol2000 but ol2002 is
installed.
Many thanks in advance,
s3ven - http://s3ven.freesurf.fr
I have problem with a function get_ItemProperties. It works on Outlook
2002 and 2003 but generate a debug ESP error ("value of esp was not
properly saved across a function call. This is usually a result of
calling a function with a function pointer declared in a different
calling convention.").
This is the code i used (i get a pointer on a the current select
contact item and try to get its properties)
CComPtr<IDispatch> _selecteditemDisp;
CComPtr<Outlook::_ContactItem> _selecteditem;
HRESULT hr;
hr = _pSelection->Item( CComVariant(1),
(IDispatch**)(&_selecteditemDisp));
if ((SUCCEEDED(hr)) && (_selecteditemDisp!=NULL))
{
hr=_selecteditemDisp->QueryInterface(_uuidof(Outlook::_ContactItem),
(void**)&_selecteditem);
if ((SUCCEEDED(hr)) && (_selecteditem!=NULL))
{
CComPtr<Outlook::ItemProperties> pIP;
_selecteditem->Display(); // this function works correctly in ol2k
pIP.p = NULL; // is it required?
hr =_selecteditem->get_ItemProperties(&pIP); // generate the ESP
error
// do something with pIP...
}
}
I import the corrects olb and dll file (mso9*) for ol2000 but ol2002 is
installed.
Many thanks in advance,
s3ven - http://s3ven.freesurf.fr