C# 2005 COM 和 .NET 访问被拒绝 0x80070005 E_ACCESSDENIED
我正在用 C# 2005 重写一个 C++ 应用程序。该应用程序有 2 个组件:一个进程外 COM 服务器,可以由 C++ 服务启动。 COM 服务器使用传出接口,这意味着它在发生特定事件时从 C++ 服务模块调用事件处理程序方法。
我正在重写C++服务部分。 现在我刚刚开发了一个应用程序,它使用运行时可调用包装器和连接点来启动 COM 服务器并提供事件处理程序方法的实现。 当我运行应用程序时,COM 服务器启动正常,但当 COM 服务器尝试调用应用程序的事件处理程序方法时出现异常。
访问被拒绝。 (HRESULT 的异常:0x80070005 (E_ACCESSDENIED))
我在网上搜索了很多,这些是与我的问题密切相关的几个主题: http://www. codeproject.com/Forums/1648/COM.aspx?fid=1648&select=2189754&fr=1792#xx2189754xx
任何帮助将不胜感激。
I am rewriting a C++ app in C# 2005. The App has 2 components: one out-of-process COM server which can be started by a C++ service. The COM server uses outgoing interface, meaning it invokes event handler method from the C++ service module upon certain event.
I am rewriting the C++ service part. Right now I have jut developed an app that uses Runtime Callable Wrapper and Connection point to start the COM server and provides implementation for the event handler method. When I run the app, the COM server starts up fine but I get an exception when the COM server tries to invoke the event handler method of the app.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I searched the web a lot and these are couple topics which closely relate to my problem:
http://www.codeproject.com/Forums/1648/COM.aspx?fid=1648&select=2189754&fr=1792#xx2189754xx
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我开发 COM 互操作 DLL 时,我在构建过程中遇到了同样的错误。 我通过从 GAC 卸载旧版本的 DLL 解决了这个问题。 然后我就能够构建 DLL,而不会出现 E_ACCESSDENIED 错误。
I had the same error during the build process when I was developing a COM interop DLL. I solved the problem by uninstalling the old version of the DLL from the GAC. Then I was able to build the DLL without the E_ACCESSDENIED error.