I am writing a Visual Studio add-in to process C++ code, and think that COM interop is slowing me down to much. I therefore want to pass a C# reference to a COM object to a small C++ DLL, have the DLL perform the necessary calculations and return back a string.
I would be passing a CodeFunction2 object to the DLL and getting an XML string with information on the method back.
While you are welcome to question whether I really need this for the performance boost, if you call a dozen member variables accross a COM interop for thousands of methods it seems to eat up way too much time changing between managed and unmanaged code.
How do I format the arguments to the C++ DLL? I have no experience with calling unmanaged code from managed code in general, but the main question I need answered is how to format the call.