I have a c++ application that I need to interface with a c# DLL. I've used the example provided in the link below to load the CLR and call the member function (named "Run") that I need to from the c# DLL. This works as expected.
http://code.msdn.microsoft.com/windowsdesktop/CppHostCLR-e6581ee0
However, it would be beneficial to me to call the function in the DLL (i.e, Run) in another thread. If this were pure c# code, I would do something like:
Type type = assembly.GetType(assemblyName);
Object obj = Activator.CreateInstance(type, ServerIP, Port);
MethodInfo method = type.GetMethod("Run");
Thread thread = new Thread(delegate()
{
method.Invoke(obj, null);
});
thread.Start();How can I do something similar in c++ using the CLR (as demonstrated in the link)?
Thank you!