Reputation: 19
I created a dll function in a separate dll project, then created the program in C # and called .dll.
However, if the data you need to pass to the dll is wrong, the C # program will stop working and exit.
I tried to use the try catch syntax on the dll project side, but it was not what I wanted. (What I wanted to do was to automatically pass the following information when the problem occurred)
I want to solve the problem that C # is forcibly terminated when the dll side does not receive a proper response or after a certain period of time.
If you know how to do it, I would appreciate it if you could give me your know-how and knowledge.
Thank you for reading. Answers I'll wait. :)
Upvotes: 0
Views: 57
Reputation: 1625
It sounds like your problem is that your are trying to force incorrect data into a method from a dll which it resulting in an exception that is crashing the program. If this the case I would not put your try catch block in the dll , but rather around your call to the dll method.
If I understood the question correctly that should at least stop the program from crashing.
I hope this helps!
Upvotes: 2