Communication between C ++ and C #?
I want to use both C ++ and C # in my application.
C # for GUI design and C ++ for processing.
But I don't know about that. How to communicate between them.
I don't know where I should start and research.
Can anyone please tell me about this technology? And if anyone has a document on this topic, please give it to me.
I am using Visual Studio 2010 for development.
Many thanks,
T & TGroup
source to share
The technology you are looking for is C ++ / CLI , a native language extension for C ++ that allows you to interact with .Net code.
The basic idea is this: you write your C ++ libraries, as always, in portable ISO C ++. Then you add a thin wrapper to C ++ / CLI for whatever C ++ components you want to call from C # (or any other .Net language for that matter). Just keep in mind that C ++ / CLI is only for writing code to interact with .Net. Don't be tempted to write the implementation in the CLI, as you will end up with code that is not portable and is probably much harder to maintain than the pure C ++ version.
source to share
Depending on how your application architecture needs to be, you can, for example, create two different applications, one being the core and the other being the GUI and communicate via messaging.
On Windows, you can use Windows message queue , for example, to have both endpoints communicate with each other.
source to share