I use the external C library in my program encoded in C ++ / CLI with the .NET framework 4. Sometimes lib fails and I get the message:
Unhandled exception: System.AccessViolationException: attempt to read or write protected memory.
So I tried to process it with a try / catch block:
try { Init();
But the exception remains undetected: my program crashes before entering the catch block.
How can I handle this exception to prevent my program from crashing?
source share