When calling C++ functions from C# code, which way gives the best performance?
- COM interop
- C++-CLI (is that future proof?)
- HTTP REST API
- Something else?
I imagine that COM interop gives best performance, and that the performance falls quickly when you go down the list. Or am I completely wrong?
Background
We have a old central server application written in C++/MFC. Today, there are no easy ways for other applications to communicate with this application, and we want to develop an API for it.
In today's application, performance is important, and we want reasonably high performance even in those applications that use the new API.
The applications that will use the API will be written in both C++, C# and PowerShell. Probably, some sort of Facade must be made for each language, but we do not want it to be too much work to keep the different facades updated with changes in the API. The best thing would have been if the Facades were automated generated at compilation.
Edit
With Functions, I mean functions to get status, get and set information in the internal database (that can be long text strings), etc