sound like a terrible idea? Yeah I thought so too. Needless to say im told I have to do it.
Situation: Old MFC-based C++ gui application that reads and processes a whole lot of data sources into an internal datastructure, before displaying it to the user.
Problem: I need that datastructure in .NET, in XML will do.
Solution:
- Make a function in the MFC app that writes the datastructure to a big XML string(easy).
- dllexport this function(or COM?)(as a C++ or C funtion or what?)
- Compile the MFC GUI app into a dll(how?).
- ???
- Reference the dll from .NET and P/Invoke method for great profit.
Is this insanity? Is it possible to compile a dll library from a GUI MFC app without changing it? Is it a horrible idea? What are my alternatives? Im pretty lost tbh.