PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Outlook crashes at shutdown... explorer problem?

Reply

Outlook crashes at shutdown... explorer problem?

 
Thread Tools Rate Thread
Old 14-07-2003, 11:12 PM   #1
LukeV
Guest
 
Posts: n/a
Default Outlook crashes at shutdown... explorer problem?


I have these events:

(Outlook::ExplorerEvents)> ExplorerBeforeFolderSwitch;
(Outlook::ExplorerEvents)> ExplorerClose;
(Outlook::ApplicationEvents)> ApplicationQuit;

This pointer:

CComPtr<Outlook::_Explorer> m_spExplorer;

ExplorerBeforeFolderSwitch:ispEventUnadvise((IDispatch*)m_spExplorer);

In OnExplorerClose:
{
// Get the Command Bar position
if( m_spCmdBar )
{
m_spCmdBar->get_RowIndex( ®.m_nCBRowIndex );
m_spCmdBar->get_Left( ®.m_nCBLeft );
}

hr =
ExplorerBeforeFolderSwitch:ispEventUnadvise((IDispatch*)m_spExplorer);

hr = ExplorerClose:ispEventUnadvise((IDispatch*)m_spExplorer);

m_spExplorer = NULL;
}


I set m_spExplorer = NULL so OnApplicationQuit will get called (it won't if
I don't set the pointer to NULL). In Outlook 2002, this works fine but
setting the pointer to NULL will crash Outlook 2000.

By the way, the crash will only occur if I change the selection in the
Folder List view...

Any hints? Thanks!


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off