最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

.NET 9.0: how to catch System.ExecutionEngineException from unmanaged DLL? - Stack Overflow

programmeradmin3浏览0评论

My .NET Core service uses some unmanaged DLLs. To make it robust, I want to be able to catch System.ExecutionEngineException, which is caused by a defective DLL and which kills my complete process. My intention is to stop the thread, which called the DLL, so why should it not be allowed to catch it?

Note: in the former .NET 4.8 version of this code, I was able to use the System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions attribute in my calling function, which allowed my to get those exceptions.

Is there a way to handle this also with .NET 9.0?

发布评论

评论列表(0)

  1. 暂无评论