Mixing .net languages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a program that I had written in Managed C++ that writes messages to the console while running. I wanted to allow the user to enter commands at the console as well, but this became difficult since the console was continuously being updated with messages. I thought to write a VB front end for the program to have a console-like window (textbox) to display the messages, and a box that will allow the user to enter commands uninterrupted. My problem is mixing the two languages. If I am correct, I can compile the C++ application as a .dll file that gets imported into the VB application for use. But the original program is the one that does the writing to the console - how do I capture that and redirect it to a VB textbox? I thought about setting up a Stream to a textbox, since Managed C++ can work with Streams - but I do not know if this is possible. Any ideas

Thank you
Tim
 
Hi,

I have a program that I had written in Managed C++ that writes messages to the console while running. I wanted to allow the user to enter commands at the console as well, but this became difficult since the console was continuously being updated with messages. I thought to write a VB front end for the program to have a console-like window (textbox) to display the messages, and a box that will allow the user to enter commands uninterrupted. My problem is mixing the two languages. If I am correct, I can compile the C++ application as a .dll file that gets imported into the VB application for use. But the original program is the one that does the writing to the console - how do I capture that and redirect it to a VB textbox? I thought about setting up a Stream to a textbox, since Managed C++ can work with Streams - but I do not know if this is possible. Any ideas?

Thank you,
Tim

Tim,

System.Diagnostics.Process is your friend... You can launch your app
and redirect it's stdout/stdin.

HTH
 
Back
Top