Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi. I'd like to start by saying my C++ skills are intermediate at best, so bear with me if i'm asking stupid questions, or if I don't understand your answers fully.
What i'm trying to do is take data gathered by a C++ console project, and pass it to a C# windows application. The idea is that the data from the console program will cause some buttons to flash on and off and make a progress bar go up and down depending on what data the console program sends.
The console application is based off of this: http://www.music.mcgill.ca/~gary/rt...
with a few minor modifications of my own.
The most obvious solution here would be to write the console data to a file, then have the C# program read and use it. Unfortunately I don't think that this is going to work, as the data transfer has to be real-time, or at least as close to real time as possible (a delay of several seconds might be ok). Also I'm not sure if two programs can have a file open at the same time.
I'm open to any solution, so long as the data gets from point A to point B in under 3 seconds.
Thanks for your time,
Nil

I would seriously consider a socket connection between the two systems.
A little bit of a pain to write, but very fast.
Guy

Does the C# application start the C++ application's process (using something like Process.Start())? If so, I would just redirect the output stream for the C++ process and read it in C#...Should be nearly instantaneous. There's various ways to do it, I have some code that should be a pretty good starting point. If you need it, let me know and I'll e-mail it to you. It's too long to post here.
Good luck,
-SN

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |