Hello,
I've encountered a problem and I hope someone will be able to help.
I have a C# application running in IE in the following way:
IE loads an C# activeX that run my C# application.
My application registered to Application.ThreadException event but I
found
that some exceptions are not cought by my handler.
I used Application.SetUnhandledExceptionMode in my C# activeX's static
constructor (this way I'm using this method before any control handle
is
being created). Till here everything is great! all exceptions were
cought by
my handler.
Now to my problem: I installed on my IE a self made add-in (some tool
bar)
written in C#.
The add-in is created when IE start running.
After IE start running, I typed my URL (the one that runs the ActiveX
from
above) and my static constructor throws an exception when calling:
SetUnhandledExceptionMode. The reason: A control handle was created (my
IE
add-in).
How can I bypass this problem? my application is an application that is
planned to be installed on many machines which some of them (by nature)
will
have some .NET add-ins installed on their IE.
I need to SetUnhandledExceptionMode because I have to catch all
exceptions
but calling the method SetUnhandledExceptionMode when there is a
control
handle on the macine causes an exeption.
Thanks,
Burgazon