WPF 应用程序中的 InvalidCOMException
我收到此 InvalidCOMException“无法使用已与其底层 RCW 分离的 COM 对象”。我在我的 WPF 应用程序中使用 DirectX,谁能告诉我这个错误是什么以及如何解决这个问题。任何帮助都很有价值。
谢谢。
I am getting this InvalidCOMException "COM object that has been separated from its underlying RCW cannot be used". I am using DirectX in my WPF app, Can anyone please tell me what is this error and how can I fix this. Any help be of great value.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您在代码中引用 COM 对象以及处置应用程序或类时,通常会出现此错误。由于没有提供代码,所以我假设这与此处描述的情况相同 -
已与其底层 RCW 分离的 COM 对象无法使用 - 为什么会发生这种情况?
已与其分离的 COM 对象底层RCW无法使用
http://blogs.msdn.com/b/martijnh/archive/2009/12/31/unit-testing-com-object-that-has-been-separated-from-its-underlying-rcw-cannot -be-used.aspx
通常,在
STA 公寓状态
线程应用程序的情况下出现。This error generally comes in scenario's when you are referring COM object in your code and while disposing of your application or class. Since no code is supplied so i am assuming this is the same scenario's as described here -
COM object that has been separated from its underlying RCW can not be used - why does it happen?
COM object that has been separated from its underlying RCW cannot be used
http://blogs.msdn.com/b/martijnh/archive/2009/12/31/unit-testing-com-object-that-has-been-separated-from-its-underlying-rcw-cannot-be-used.aspx
Generally, comes in case of
STA Apartment State
threading Applications.