[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Handling Unhandled Exception in DotNet

Acchu

6/18/2008 10:53:00 AM

Hi,
i'm loading a third party unmanaged dll in my dot net application.
the dll doesn't have a try catch block for any of the functions
declarations . When a method in the dll is called by the dot net
application, the dll creates a thread and for some reason the thread
throws a access violation exception.

The third party vendor who provided the DLL isn't ready to fix the bug
as its not happening in their C++ application.

Now in my dot net application how do i handle this issue. i tried
using the AppDomain.UnhandleException event; but its not handling the
AV exception and my Application always crashes with the crash info.

i don't want the application to crash and it has to run continuously.

how do i achieve this.

i would appreciate if someone can help me on this.

Thanks
Regards,
Aswin.N.Paranji
1 Answer

Patrice

6/18/2008 11:09:00 AM

0

For now my understanding is that it always crashes. So the first step would
be likely to find out why so that you can solve the problem (handling
exception is not about avoiding errors it is about what to do when you have
one, just hiding the errror is unlikely to solve the source problem).

Have you tried to make a bare bone test on this DLL to see if it works in
the simplest conditions. Does it fails for sdome functions or all functions
? Etc...

--
Patrice

"Acchu" <aswin.paranji@gmail.com> a écrit dans le message de groupe de
discussion :
8676abe6-59cf-4bb0-b331-874c6354c59c@w7g2000hsa.googlegroups.com...
> Hi,
> i'm loading a third party unmanaged dll in my dot net application.
> the dll doesn't have a try catch block for any of the functions
> declarations . When a method in the dll is called by the dot net
> application, the dll creates a thread and for some reason the thread
> throws a access violation exception.
>
> The third party vendor who provided the DLL isn't ready to fix the bug
> as its not happening in their C++ application.
>
> Now in my dot net application how do i handle this issue. i tried
> using the AppDomain.UnhandleException event; but its not handling the
> AV exception and my Application always crashes with the crash info.
>
> i don't want the application to crash and it has to run continuously.
>
> how do i achieve this.
>
> i would appreciate if someone can help me on this.
>
> Thanks
> Regards,
> Aswin.N.Paranji