"Dmitriy Lapshin [C# / .NET MVP]" <x-(E-Mail Removed)> wrote in message news:<ORct$(E-Mail Removed)>...
> Does it disappear from the list of the tasks or from the list of processes?
Excuse me, I hadn't been clear enough.
The IEXPLORE.EXE process disappears from the list of processes.
> This difference is important. If it disappears from the list of processes,
> then my only suggestion would be that the AppDomain is not given a chance to
> uninitialize properly and therefore it cannot raise the event in question.
>
I agree with you on this potential cause.
> Another guess after reading the corresponding MSDN topic - security
> permissions (CLR hosted in IE runs managed code with rather tight security
> restrictions) can affect raising this event. This seems strange to me, as
> you wouldn't then be able to subscribe to that event in the first place.
>
I forgot to mention that I'm logged as local administrator and that I
enabled
full code access for my assembly on my local machine.
Another interesting thing is that I can register
an UnhandledExceptionEventHandler without any exception being thrown.
However, my routine is not called when an unhandled exception is
thrown.
Instead, this is the CLR routine that is called.
The event is not fired.
This leads me to think that in this case, the event registration
REALLY failed !
But I expected that after my reading on an excellent article on MSDN :
"Return of the Rich client".
> --
> Dmitriy Lapshin [C# / .NET MVP]
> X-Unity Test Studio
> http://x-unity.miik.com.ua/teststudio.aspx
> Bring the power of unit testing to VS .NET IDE
>
> "Olivier R" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I don't agree with you.
> > I checked that the internet explorer process instance exits since
> > it disappears from the list of the tasks in the task manager or there
> > is something wrong with my eyes ?
> >
> > "Dmitriy Lapshin [C# / .NET MVP]" <x-(E-Mail Removed)> wrote
> in message news:<O0wSu6$(E-Mail Removed)>...
> > > Hello,
> > >
> > > I think it's because the process itself (in this case the iexplore.exe
> that
> > > hosts the CLR) does not actually exit.
> > >
> > > --
> > > Dmitriy Lapshin [C# / .NET MVP]
> > > X-Unity Test Studio
> > > http://x-unity.miik.com.ua/teststudio.aspx
> > > Bring the power of unit testing to VS .NET IDE
> > >
> > > "Olivier R" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Hello,
> > > >
> > > > My configuration :
> > > > Windows XP
> > > > Internet Explorer 6
> > > > .NET Framework 1.0
> > > > Visual Studio .NET 2002
> > > >
> > > >
> > > > The symptoms:
> > > > I have created a class which registers a handler for the
> > > > AppDomain.ProcessExit event (say this is done in a static method
> Class.Init()).
> > > >
> > > > Case 1:
> > > > Class hosted in a Windows Application :
> > > > The handler is called when I close the Windows Application.
> > > >
> > > > Case 2:
> > > > Class hosted in Internet Explorer :
> > > > The handler is not called when I close Internet Explorer !!
> > > > (I obviously checked that Class.Init() had been called).
> > > >
> > > > Can someone help me ??
> > > > Thanks !