关闭.NET VSTO Excel 2003工作簿时出现0xe0434f4d异常解决方案

发布于 2024-08-28 02:33:11 字数 399 浏览 1 评论 0原文

我编写了一个从 Excel 03 中的操作窗格运行的控件。该控件引用附属 .NET 程序集。该控件工作正常,但当我退出 Excel 时,出现异常。我已经检查过并确保我正确处理了所有物品。我在创建的 cldatapi 对象上调用了 dispose 方法并将其设置为空。我也不知道如何捕捉这个错误。我尝试从 thisworkbook 类中捕获未处理的异常,但它没有捕获它。

事件类型:clr20r3 P1:excel.exe P2:11.0.5612.0 P3:3f39ff9d P4:okuma.cldatapi P5:1.7.0.3 P6:494bc115 P7:25 P8:f2 P9:system.exception

当我查看错误报告的详细信息时,它显示异常代码为 0xe0434f4d

okuma.cldatapi 是卫星参考。

I've written a control that runs from the Actions Pane in Excel 03. This control references a satellite .NET assembly. The control works fine but when I exit excel I get an exception. I've gone through and made sure that I'm properly disposing all of my objects. I called the dispose method on cldatapi object I created and set it to nothing. I can't figure out how to catch this error either. I tried catching unhandled exceptions from the thisworkbook class but it didn't catch it.

EventType : clr20r3 P1 : excel.exe P2 : 11.0.5612.0 P3 : 3f39ff9d
P4 : okuma.cldatapi P5 : 1.7.0.3 P6 : 494bc115 P7 : 25 P8 : f2
P9 : system.exception

When I look at the details of the error report it show the exception code as 0xe0434f4d

okuma.cldatapi is the satellite reference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枫以 2024-09-04 02:33:11

这是托管异常的异常代码。当代码在 Excel 中运行时,启动 Visual Studio 并使用“工具”+“附加到进程”。从列表中选择 excel.exe,然后选择托管代码。调试 + 异常,选中公共语言运行时异常的抛出框。

当抛出异常时,调试器将停止。

That's the exception code for a managed exception. While your code is running in Excel, start Visual Studio and use Tools + Attach to Process. Select excel.exe from the list and select Managed code. Debug + Exceptions, check the Thrown box for Common Language Runtime Exceptions.

The debugger will stop when the exception is thrown.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文