开发者

.net assembly interop exceptions handling

I am calling a .Net assembly from a Delphi project using COM interop.

Can I catch .Net exceptions in Delphi thrown by the assembl开发者_运维知识库y?


COM does not work with .NET exceptions but with HRESULT values. So there is no way you can catch .NET exceptions at Delphi side. You just receive a HRESULT with an error value. If you are lucky you will get an HRESULT with a specific error value so you know what has gone wrong, if you're unlucky, you will get some generic HRESULT value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜