R
ryotyankou via OfficeKB.com
I write a explorer wrapper for my outlook2003 addin, OnConnection, i add
existing explorers into wrapper and all are ok. But when i open a new
explorer, i use the input parameter pExplorer which show below, but While i
use it to get CommandBars, it failed with code 0x90704005, what's the wrong?
void __stdcall CToolBarObject::OnNewExplorer(IDispatch * pExplorer)
{
try
{
CComQIPtr<Outlook::_Explorer> spThisExp = pExplorer;
explorer_wrap::AddExplorer(spThisExp);
}
catch (...)
{
}
}
If i use "ActiveExplorer" instead of "pExplorer", the toolbar alway be
created on the first main explorer, as a result there are many toolbars on
first explorer, not what i wanted. And in outlook2007 my code can work.
existing explorers into wrapper and all are ok. But when i open a new
explorer, i use the input parameter pExplorer which show below, but While i
use it to get CommandBars, it failed with code 0x90704005, what's the wrong?
void __stdcall CToolBarObject::OnNewExplorer(IDispatch * pExplorer)
{
try
{
CComQIPtr<Outlook::_Explorer> spThisExp = pExplorer;
explorer_wrap::AddExplorer(spThisExp);
}
catch (...)
{
}
}
If i use "ActiveExplorer" instead of "pExplorer", the toolbar alway be
created on the first main explorer, as a result there are many toolbars on
first explorer, not what i wanted. And in outlook2007 my code can work.