How to expose .net object to remote c++ client
We have a .net library developed in C#. It needs to be exposed to a unmanaged C+开发者_运维知识库+ client thats available in a remote machine. By what means could we resolve this?
It really depends on what OS you are working on. If it is Windows 7/Windows Server 2008 (or later, for future correctness) you should research WWSAPI as that is Microsoft's native code implementation of WCF. Earlier Windows OSes may require use of third party SOAP libraries designed for interop with WCF. I'm not sure of the status of these these days.
Another option, assuming the above isn't viable, would be to write a C# or C++/CLI proxy on the remote machine that the unmanaged client can talk to using standard inter-process communications like RPC, shared memory, COM or other technologies. The proxy then handles the WCF calls to the C# server. This should be workable in most scenarios.
Edit: I'm assuming use of WCF for remote communications using .Net code. For answers regarding other potential items, someone else will have to answer because my knowledge in those areas are a lot more sketchy.
精彩评论