如何编写类似于运行对象表(ROT)的WCF服务?

发布于 2024-11-16 12:38:31 字数 441 浏览 7 评论 0原文

我正在尝试编写 运行对象表,如 WCF 服务 (.NET 4.0),用于跨进程提供对某些 COM 控件的访问。该服务可由 COM 和 .NET 客户端访问。

我选择 WCF 是因为它被推荐用于进程间通信,而且我还认为如果我不必依赖于我没有太多控制权的 ROT,那会很好。

解决了几个问题后,我遇到了障碍。我不知道如何通过服务传递 COM 控制并将其返回给客户端。该对象永远不会到达服务。尽管建议将 WCF 用于 IPC,但它不提供对传递 COM 对象的开箱即用支持。到目前为止我还没有找到任何解决方案。可能 WCF 服务不是替换运行对象表的正确方法。但我没有看到更好的 IPC 方法。

对此有何建议?

I am trying to write a running object table like WCF service (.NET 4.0) for providing access to some COM controls across processes. This service is accessed by both COM and .NET clients.

I chose WCF since it is recommended for inter-process communication and I also thought it would be good if I don't have to depend on ROT where I don't have much control over.

After solving several hiccups, I reached a road block. I don't know how to pass the COM control through the service and give it back to a client. The object never reaches the service. Though WCF is recommended for IPC, it does not provide out of the box support to pass COM objects. I also haven't found any solutions so far. May be WCF service is not the right approach to replace running object table. But I don't see a better way to do IPC.

Any suggestions on this?

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

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

发布评论

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

评论(2

独守阴晴ぅ圆缺 2024-11-23 12:38:31

COM objref 无法在 WCF 消息中传递(好吧,我想您可以在接收器大小上创建一个 MEOW 解释器并使用 CoMarshalInterThreadInterfaceInStream 来传递 objref)

但是,您可以将对象放入 GIT 中并传递 GIT cookie大约

A COM objref can't be passed around in a WCF message (well I guess you could create a MEOW interpreter on the receiver size and use CoMarshalInterThreadInterfaceInStream to pass the objref)

However, you could put the objects in the GIT and pass the GIT cookies around

耀眼的星火 2024-11-23 12:38:31

但是我们可以通过实现 IUNKNOWn 接口直接将 COM 对象放入 ROT 中

But we can directly place COM object into the ROT by implementing IUNKNOWn interface

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