WCF managed and unmanaged

  • Thread starter Thread starter Amiru
  • Start date Start date
A

Amiru

I need a reliable and effcient way to connect two modules one writen in
native C++ code and the second written in C# as a WCF service.
The connection should be bidirectional connection.
What is the best way ?
1) COM? and how do I create a bidirectional connection between the 2 modules.
2) MSQueue? Is it effcient enough?

Is it possible to host a WCF server under native ATL windows service?
Is it possible to do .net windows hosting to the unmanaged module safly?
Do you recommend to run the 2 modules in 2 different processes?
 
Hello, Amiru!

How do these modules interact?
WCF service uses contract so C++ module has to interact acording to it.

WCF service is extensible that is you can create custom binding and custom
transport for it. For instance use plain sockets.

A>MSQueue? Is it effcient enough?
IIRC WCF has already that transport built-in. However, it can not be as
efficient as you want.

A> Is it possible to host a WCF server under native ATL windows service?

This is CLR hosting scenario, where unmanaged process hosts CLR that then
runs managed process. Yes, it is possible

A> Is it possible to do .net windows hosting to the unmanaged module safly?

Didn't understand the question. You ment .NET application is hosting
unmanaged module? Managed code can make call to unmanaged using P/Invoke and
Interop

A> Do you recommend to run the 2 modules in 2 different processes?

Yes. I think it will be simpler. Hosting scenarios are rather complicated.
If C++ and WCF modules reside on the same machine, then any inter process
communation (IPC) method will do.
 
Back
Top