2

I write a simple program that used external dll when I call a function of that dll, dll run a thread then function passed succesfully but after while thread cause exception and program closed I want to now how to handle this bug so my program can continue work

2 Answers 2

5

You can create an event handler for unhandled exceptions in a given app domain

http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception(v=vs.71).aspx

If nothing else handles the Exception, that event handler will be invoked.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi thanxs for answer but after unhandledexception event fire application will terminate.
0

First you need to know what releases the exception and then you should work on preventing it. You can disassamble the dll with http://www.reflector.net to view the code inside the dll.

1 Comment

thanx I know where exception is occurre but I cant handle it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.