I believe lot of people already asked this question before, but i kept getting confused more and more. I am looking for a answer in layman's terms. I have a c++ library to perform one action. I need to call the functions from this library from my C# program. What is better way to do this and why? whether pinvoke from C# app or write a wrapper in C++/CLI.
There is only 1 function in C++ library (ReadNextRecord) which will be called from C# program. C# program should first create object of class defined in C++ library and then call a function to get the next record from a data source. Function is called many times ( >50000 times) so efficiency is an issue.
In most documents I see how to wrap a function to call from C# code. I dont see more complicated example where a c++ object is created in C# space and then a func is called on the object.
Please advice.
Regards, Alok