C# to C++/MFC duplex mode - Concept

Markus Freitag 3,791 Reputation points
2021-06-30T18:58:17.22+00:00

Hello,
I have a static MFC C++ application, I cannot change it. (CLI is not possible)

I now need to pass data from a C# DLL in the C++ application and transfer it from the C++ to the C# DLL. What possibilities do I have to implement this successfully.

110695-concept.png

Can you show an example

SendDataOrderToCPP(string order, double price, int amount)  
  
ResponseDataOrderToCSharp(string order, double price, int amount)  

-----
Is there a possibility that the C# DLL sends an event and I can evaluate the value in the C++ app?

Is it possible that the C++ exe sends an event and I can evaluate the value in the C# DLL?

How would I have to create this?

//----
Background

I need to implement a WinForm in C# in which I can make inputs. I have to analyse these inputs in C++.

After the analysis, I have to send new data from C++ to C# to display the calculated values.

Or I need an additional DLL ?
110675-concept-2.png

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

Developer technologies | .NET | .NET CLI
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more