I have a Windows Communication Foundation (WCF) service programmed in C#. I need to host it inside my C++ MFC native application (no C++/CLI). I don't know how to do that. The client is also a C# application.
Can anyone help me out?
OK - If you want a WCF service, I'd strongly urge you to implement the service in .Net and publish it with IIS.
I'd urge you to forget about MFC. Especially if you're considering Windows Tablet 8. Or Apple iPad!
For truly portable tablet clients, I'd strongly urge you "think HTML5" and look at a framework like AppCelerator Titanium or PhoneGap:
Finally, if you want your WCF service (or any .Net functionality) to "communicate with the internals of your C++ program", you've got lots of choices. Including "Interop": declaring an external reference and simply making a subroutine call into your unmanaged (C++) code:
http://msdn.microsoft.com/en-us/library/aa645736%28v=vs.71%29.aspx
http://msdn.microsoft.com/en-us/library/aa645738%28v=vs.71%29.aspx
IMHO...
I think this will help you:
How to connect a C++ COM To a WCF Service