I need to use a .NET API from C++ and need a wrapper. There are more than 60 methods in the API and as well as events, so I want something generic that I can later reuse. So let's forget about the API itself. I would take care of that once the project is done.
My idea is creating a project in C# .NET with only one function and one event.
the function would be something like this:
string generic_function (string method_name, string XML_with_all_parameters)
return "Response for method " + method_name + " with parameters:" + XML_with_all_parameters;
and the event would return also an XML with all the info required as well as the type of event. This allows to pass many event types with different info through one single generic event. I'm not sure how you plan to make the event registration on the C++ side. Please, provide a simple example of and event handler to test it. For example, you could write a couple lines of extra code inside the generic_function so that if it receives the word "fire event" in the method_name parameter you fire an event with the date and time in the XML. The event handler should receive that XML.
Of course, I will need the project for Visual Studio so that I can call the corresponding methods, do the XML packaging and unpackaging, etc.
On the wrapper side, just make sure there are no null pointer errors, memory leaks, etc and that I can call that dll from Embarcadero C++ (called C++ Builder in the old times). There are slight differences in the function naming and calling convention, but you already did that on our last project so it should not be a problem.
I have both Embarcadero and Visual Studio so I can test it all as soon as it is done.
If you need any extra details, just say it