Group:  Microsoft Outlook » microsoft.public.outlook.program_addins
Thread: outlook doesn't closed well

Geek News

outlook doesn't closed well
"David Cebrian" <david_cebrian[ at ]msn.com> 2/13/2006 11:16:44 AM
Hi people,

I have a COM Add-in for Outlook 2003, and the problem is when I close the
outlook, the process outlook.exe in the task manager don't disapear, then if
I try to open the outlook again it fails.

Anybody can give an idea for this

Tanks in advance,

Jaume F.


Re: outlook doesn't closed well
"donald" <jonathan[ at ]dorling.biz> 2/13/2006 2:27:15 PM
have you try outlook with out your COM add-in load to see if it is your
add-in or not?

Donald

Re: outlook doesn't closed well
"David Cebrian" <david_cebrian[ at ]msn.com> 2/13/2006 2:41:21 PM
yes, when I execute the outlook without my add-in it works fine, the problem
is when I close outlook without remove my add-in, after I can not open the
outlook again, because the process outlook.exe still in the task manager.


"donald" <jonathan[ at ]dorling.biz> escribió en el mensaje
news:1139840835.151173.323410[ at ]o13g2000cwo.googlegroups.com...
[Quoted Text]
> have you try outlook with out your COM add-in load to see if it is your
> add-in or not?
>
> Donald
>


Re: outlook doesn't closed well
"Thaddaeus Parker" <tparker[ at ]microlinkllc.com> 2/13/2006 2:45:49 PM
This is due to the fact that you are not releasing any of your objects that
are being created by your add-in. You MUST be absolutely sure that in
explorer Close Event or some uninitHandler that you are releasing whatever
objects you were using during the execution of your add-in namely: buttons,
menu items, wrapped outlook objects. Without know what your code is doing
right now, I would suggest that you in your on disconnection event of the
add-in go and set all of your Commandbarbuttons, explorers, inspectors,
folders to null (Nothing) and see if that fixes your problem.

Regards,

Thaddaeus.
"David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
news:%23KPSXtKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> yes, when I execute the outlook without my add-in it works fine, the
> problem
> is when I close outlook without remove my add-in, after I can not open the
> outlook again, because the process outlook.exe still in the task manager.
>
>
> "donald" <jonathan[ at ]dorling.biz> escribió en el mensaje
> news:1139840835.151173.323410[ at ]o13g2000cwo.googlegroups.com...
>> have you try outlook with out your COM add-in load to see if it is your
>> add-in or not?
>>
>> Donald
>>
>
>


Re: outlook doesn't closed well
"Josh Einstein" <josheinstein[ at ]hotmail.com> 2/13/2006 4:08:46 PM
I also recommend running the garbage collector when explorers and inspectors
count become 0.

GC.Collect();
GC.WaitForPendingFinalizers();

This will ensure anything abandoned is collected by the GC and their
finalizers are run (which decrements their reference counters, thus freeing
your hold on the underlying COM object).

And also as I mentioned in the other group. I've found that accidentally
accessing Outlook objects from a background thread will cause random
problems with Outlook sticking around.

Oh and be sure to explicitly unbind any events you're listening to. I found
in a memory profiler that huge trees of objects were being kept alive
because of the way .NET manages event bindings.

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com


"Thaddaeus Parker" <tparker[ at ]microlinkllc.com> wrote in message
news:u1aUMxKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> This is due to the fact that you are not releasing any of your objects
> that are being created by your add-in. You MUST be absolutely sure that
> in explorer Close Event or some uninitHandler that you are releasing
> whatever objects you were using during the execution of your add-in
> namely: buttons, menu items, wrapped outlook objects. Without know what
> your code is doing right now, I would suggest that you in your on
> disconnection event of the add-in go and set all of your
> Commandbarbuttons, explorers, inspectors, folders to null (Nothing) and
> see if that fixes your problem.
>
> Regards,
>
> Thaddaeus.
> "David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
> news:%23KPSXtKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
>> yes, when I execute the outlook without my add-in it works fine, the
>> problem
>> is when I close outlook without remove my add-in, after I can not open
>> the
>> outlook again, because the process outlook.exe still in the task manager.
>>
>>
>> "donald" <jonathan[ at ]dorling.biz> escribió en el mensaje
>> news:1139840835.151173.323410[ at ]o13g2000cwo.googlegroups.com...
>>> have you try outlook with out your COM add-in load to see if it is your
>>> add-in or not?
>>>
>>> Donald
>>>
>>
>>
>
>


Re: outlook doesn't closed well
"David Cebrian" <david_cebrian[ at ]msn.com> 2/14/2006 9:59:02 AM
Hi Josh,

I run the garbage collector, but the problem persists.

thanks for your time.

"Josh Einstein" <josheinstein[ at ]hotmail.com> escribió en el mensaje
news:%23AP3FfLMGHA.3860[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text]
> I also recommend running the garbage collector when explorers and
inspectors
> count become 0.
>
> GC.Collect();
> GC.WaitForPendingFinalizers();
>
> This will ensure anything abandoned is collected by the GC and their
> finalizers are run (which decrements their reference counters, thus
freeing
> your hold on the underlying COM object).
>
> And also as I mentioned in the other group. I've found that accidentally
> accessing Outlook objects from a background thread will cause random
> problems with Outlook sticking around.
>
> Oh and be sure to explicitly unbind any events you're listening to. I
found
> in a memory profiler that huge trees of objects were being kept alive
> because of the way .NET manages event bindings.
>
> --
> Josh Einstein
> Einstein Technologies
> Microsoft Tablet PC MVP
> Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
> www.tabletoutlook.com
>
>
> "Thaddaeus Parker" <tparker[ at ]microlinkllc.com> wrote in message
> news:u1aUMxKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
> > This is due to the fact that you are not releasing any of your objects
> > that are being created by your add-in. You MUST be absolutely sure that
> > in explorer Close Event or some uninitHandler that you are releasing
> > whatever objects you were using during the execution of your add-in
> > namely: buttons, menu items, wrapped outlook objects. Without know what
> > your code is doing right now, I would suggest that you in your on
> > disconnection event of the add-in go and set all of your
> > Commandbarbuttons, explorers, inspectors, folders to null (Nothing) and
> > see if that fixes your problem.
> >
> > Regards,
> >
> > Thaddaeus.
> > "David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
> > news:%23KPSXtKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
> >> yes, when I execute the outlook without my add-in it works fine, the
> >> problem
> >> is when I close outlook without remove my add-in, after I can not open
> >> the
> >> outlook again, because the process outlook.exe still in the task
manager.
> >>
> >>
> >> "donald" <jonathan[ at ]dorling.biz> escribió en el mensaje
> >> news:1139840835.151173.323410[ at ]o13g2000cwo.googlegroups.com...
> >>> have you try outlook with out your COM add-in load to see if it is
your
> >>> add-in or not?
> >>>
> >>> Donald
> >>>
> >>
> >>
> >
> >
>
>


Re: outlook doesn't closed well
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/14/2006 7:22:14 PM
You will need to check for the count of Explorers and Inspectors at each
Inspector.Close and Explorer.Close event. The On_Disconnection event will
not fire if the user closes Outlook if any Outlook objects are still
instantiated. In addition to the other suggestions also make sure that every
possible error in your code is handled, unhandled errors will also prevent
Outlook from closing.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
news:ubmtR0UMGHA.648[ at ]TK2MSFTNGP14.phx.gbl...
[Quoted Text]
> Hi Josh,
>
> I run the garbage collector, but the problem persists.
>
> thanks for your time.

Re: outlook doesn't closed well
"Josh Einstein" <josheinstein[ at ]hotmail.com> 2/14/2006 8:06:53 PM
Also
http://www.shahine.com/omar/WhenReleaseComObjectIsNecessaryInOutlook.aspx

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com


"David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
news:ubmtR0UMGHA.648[ at ]TK2MSFTNGP14.phx.gbl...
[Quoted Text]
> Hi Josh,
>
> I run the garbage collector, but the problem persists.
>
> thanks for your time.
>
> "Josh Einstein" <josheinstein[ at ]hotmail.com> escribió en el mensaje
> news:%23AP3FfLMGHA.3860[ at ]TK2MSFTNGP12.phx.gbl...
>> I also recommend running the garbage collector when explorers and
> inspectors
>> count become 0.
>>
>> GC.Collect();
>> GC.WaitForPendingFinalizers();
>>
>> This will ensure anything abandoned is collected by the GC and their
>> finalizers are run (which decrements their reference counters, thus
> freeing
>> your hold on the underlying COM object).
>>
>> And also as I mentioned in the other group. I've found that accidentally
>> accessing Outlook objects from a background thread will cause random
>> problems with Outlook sticking around.
>>
>> Oh and be sure to explicitly unbind any events you're listening to. I
> found
>> in a memory profiler that huge trees of objects were being kept alive
>> because of the way .NET manages event bindings.
>>
>> --
>> Josh Einstein
>> Einstein Technologies
>> Microsoft Tablet PC MVP
>> Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
>> www.tabletoutlook.com
>>
>>
>> "Thaddaeus Parker" <tparker[ at ]microlinkllc.com> wrote in message
>> news:u1aUMxKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
>> > This is due to the fact that you are not releasing any of your objects
>> > that are being created by your add-in. You MUST be absolutely sure
>> > that
>> > in explorer Close Event or some uninitHandler that you are releasing
>> > whatever objects you were using during the execution of your add-in
>> > namely: buttons, menu items, wrapped outlook objects. Without know
>> > what
>> > your code is doing right now, I would suggest that you in your on
>> > disconnection event of the add-in go and set all of your
>> > Commandbarbuttons, explorers, inspectors, folders to null (Nothing) and
>> > see if that fixes your problem.
>> >
>> > Regards,
>> >
>> > Thaddaeus.
>> > "David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
>> > news:%23KPSXtKMGHA.2216[ at ]TK2MSFTNGP09.phx.gbl...
>> >> yes, when I execute the outlook without my add-in it works fine, the
>> >> problem
>> >> is when I close outlook without remove my add-in, after I can not open
>> >> the
>> >> outlook again, because the process outlook.exe still in the task
> manager.
>> >>
>> >>
>> >> "donald" <jonathan[ at ]dorling.biz> escribió en el mensaje
>> >> news:1139840835.151173.323410[ at ]o13g2000cwo.googlegroups.com...
>> >>> have you try outlook with out your COM add-in load to see if it is
> your
>> >>> add-in or not?
>> >>>
>> >>> Donald
>> >>>
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net