I have a c# service running.I need to call few c# methods from my c++ code. what is the best and effiecient way to achieve this . Any sample for the same would be help a great deal.

You can call C++ methods from C#, but not the other way around, easily... If you have a C# service running (as a server I presume), then you can use tcp/ip to send an RPC (Remote Procedure Call) to the service from C++. The major issues will be formatting the calling message properly, and then decoding the response (if any) in the C++ code. C# manuals should have information about how to deal with that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.