Communication between C++ and C# applications

  • Thread starter Thread starter Thomas Nielsen [AM Production A/S]
  • Start date Start date
T

Thomas Nielsen [AM Production A/S]

Hi there,

I need to have one C++ application running alongside another C# application.
At various times, i need the C# application to communicate stuff to the C++
application, and I'm not sure what would be the best solution for this.

Would anyone here have an idea on how to solve the problem?

Thanks,

/Thomas
 
A common solution is to use windows messages between the applications. In
your .NETCF application you can create a class derived from the
Microsoft.WindowsCE.MessageWindow control to accept incoming (and send
outgoing) messages. The issue with this method is making each application
aware of the window handle (hwnd) of the other. You can do this by
broadcasting a custom message system wide. You can P/Invoke the
RegisterWindowMessage function to determine a unique message id for your two
applications.

Peter
 
Thanks Peter. Would you happen to know any in-depth online ressources about
this subject?. I haven't worked with windows messages before.

Cheers,

/Thomas
 
Back
Top