I have a small WPF application. I wish to integrate it within our exisiting systems. I have two COM servers implemented as MFC MDI apps, lets call them COM_Srv1 and COM_Srv2.
- COM_Srv1 needs to call a method of WPF app, say StartTask. On Task Completion WPF app notifies the COM_Srv1 app
- WPF app may need to invoke a method on COM_Srv2 to do a certain task. On completion of this task COM_Srv2 notifies WPF app with the result
Both these scenarios are similar (MFC MDI COM server calling WPF app and WPF app calling MFc MDI COM server) but I have listed them.
If it would have been the case of two MFC COM server inter communication then I would have implemented an interface and a COM event source/sink.
But I do not know the optimal way to achieve the interoperation between the WPF app and COM MFC MDI app? I have been thinking about
- WCF service as a bridge between the two
- Implement a COM end point on both the sides - ie. host a COM component with event/source sink within WPF app etc
I would appreciate if you can help with some specific information on this?