开发者

How to write a WCF service similar to Running Object Table (ROT)?

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. T开发者_开发问答he 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜