用于处理COM shim中的appdomain未处理异常的示例代码 [英] Example code for handling appdomain unhandled exception in COM shim

查看:74
本文介绍了用于处理COM shim中的appdomain未处理异常的示例代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用了Andrew Whitechapel的垫片向导来为垫片创建C ++代码。是否有关于如何处理Appdomain的未处理异常的示例代码?


我来自.Net背景并为_UnhandledException创建COM类是相当具有挑战性的。 


如果有人可以发布一些示例代码,我们将不胜感激。


另一个问题是:显示一个带有异常详细信息的消息框是一个坏主意吗垫片?我记得读到某个地方,说应该没有来自垫片的UI。这是真的吗?


 


非常感谢!


Walter

解决方案



Walter,



 



我很抱歉我不熟悉C ++。但是我发现了这个演示:



Office托管COM addIn垫片(CppOfficeManagedCOMAddInShim)< span style ="color:#333333">



http://code.msdn.microsoft.com/CppOfficeManagedCOMAddInShi-39f7be85



 



< p style ="margin:0in 0in 0pt"> 我希望这会有所帮助。



Hi,

I've used Andrew Whitechapel's shim wizard to create the C++ code for the shim. Is there any example code on how to handle the Appdomain's Unhandled Exception?

I'm coming from .Net background and creating COM class for the _UnhandledException is rather challenging. 

It would be greatly appreciated if someone could post some example code.

Another question is: Is it a bad idea to show a message box with the exception details from the shim? I recall reading somewhere that says there should be no UIs from the shim. Is that really true?

 

Thanks a lot!

Walter

解决方案

Hi Walter,

 

I’m sorry I’m not familiar with C++. However I found this demo:

Office managed COM addIn shim (CppOfficeManagedCOMAddInShim)

http://code.msdn.microsoft.com/CppOfficeManagedCOMAddInShi-39f7be85

 

I hope this helps.


这篇关于用于处理COM shim中的appdomain未处理异常的示例代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆