Help, Outlook2003 won't quit after call OnDisconnection?

  • Thread starter ryotyankou via OfficeKB.com
  • Start date
R

ryotyankou via OfficeKB.com

I write a addin, it have inspector wrapper and explorer wrapper. I release
the resource i allocated, but after run codes in OnDisconnection, outlook's
process is still in task manager. Tray icon already disappeared. What should
i check in my codes? please help.
 
K

Ken Slovak - [MVP - Outlook]

Then something in your code is not released if Outlook isn't exiting, and it
does when your code isn't running.

Check all of your Outlook objects to make sure they are being released, as
well as any Office objects. Make sure any timers or threads you started are
closed. If using managed code you may need to call
Marshal.ReleaseComObject() on your objects, try adding calls to GC.Collect()
and GC.WaitForPendingFinalizers() if using managed code.
 
R

ryotyankou via OfficeKB.com

Hi, ken, i tested my addin in VMware, outlook can quit normally. It seems
that the problem is caused by some other things, i remembered that i killed
the outlook.exe process in task manager manually(Atl + F4) while it quiting
for several times. Maybe this caused the outlook out of its manner.
 
K

Ken Slovak - [MVP - Outlook]

If under a VM the code quits cleanly then the problem is either some other
Outlook integration code that's running on the problem machine or hung
instances of Outlook. Make sure task manager doesn't show an Outlook process
running before trying again and see if Outlook quits cleanly. If not it's
probably some other code, which you can find by a process of elimination.
 

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