I have a native MFC application, that instantiates .NET dialogs. I have implemented a COM object that implements the IDispatch interface for the .NET dialogs to communicate with the native world.
When the .NET dialog calls InvokeMember then a new thread is started which executes the method.
Any idea how we make the .NET dialog call the COM interface without starting a new thread ?
P.S. Other ideas for how to communicate between the native world and the .NET world are also very welcome.
This is how .NET calls the IDispatch interface using the InvokeCom() method:
public interface IDispatch
int GetTypeInfoCount(out int Count);
int GetTypeInfo([MarshalAs(UnmanagedType.U4)] int iTInfo, [MarshalAs(UnmanagedType.U4)] int lcid, out System.Runtime.InteropServices.ComTypes.ITypeInfo typeInfo);
View Complete Post