473,772 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interaction with an external program.

Hi,
Does anyone know if it is possible to interact with another console
based program. For example, relaying data back and forth between the
user and the program.

ie.

1. User interacts with C# program.
2. C# program accepts input and sends to console program as if it was
std input
3. console program interprets commands and then sends its output to
stdout.
4. C# program reads this output and displays it to User.

Any help would be greatly appreciated.

Thanks,

-- Daniel
Nov 16 '05 #1
3 3086
Hi.
If all parts of your system are written using C# or VB.Net, you can use
Remoting to comunicate between application domains.
Regards.

"Daniel" <da************ **@gmail.com> wrote in message
news:88******** *************** ***@posting.goo gle.com...
Hi,
Does anyone know if it is possible to interact with another console
based program. For example, relaying data back and forth between the
user and the program.

ie.

1. User interacts with C# program.
2. C# program accepts input and sends to console program as if it was
std input
3. console program interprets commands and then sends its output to
stdout.
4. C# program reads this output and displays it to User.

Any help would be greatly appreciated.

Thanks,

-- Daniel

Nov 16 '05 #2
Sharon,
Thanks for the suggestion - but unfortunately the program I am wanting
to interact with is not a program I have written, and is also not
..Net.

Thanks anyways,
-- Daniel
"Sharon" <sh****@void.nu ll> wrote in message news:<Oy******* *******@TK2MSFT NGP10.phx.gbl>. ..
Hi.
If all parts of your system are written using C# or VB.Net, you can use
Remoting to comunicate between application domains.
Regards.

"Daniel" <da************ **@gmail.com> wrote in message
news:88******** *************** ***@posting.goo gle.com...
Hi,
Does anyone know if it is possible to interact with another console
based program. For example, relaying data back and forth between the
user and the program.

ie.

1. User interacts with C# program.
2. C# program accepts input and sends to console program as if it was
std input
3. console program interprets commands and then sends its output to
stdout.
4. C# program reads this output and displays it to User.

Any help would be greatly appreciated.

Thanks,

-- Daniel

Nov 16 '05 #3
> Thanks for the suggestion - but unfortunately the program I am wanting
to interact with is not a program I have written


You would still need to modify the program in any case, unless std OS piping
would work for you. Have tried getting creative with piping data to it?
Other then that, you could use namedpipes, memorymapped files, std files,
etc to talk between the processes. You would still need some pinvoke on the
..net side (unless using files) and updates to the other program also.

--
William Stacey, MVP
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3587
by: Chad | last post by:
I need my java program to exec an external .exe file, but the problem is that this program being exec()'ed prompts the user for two pieces of information. I am trying to get my java program to automatically send data to the other program but for some reason the child hangs. The first piece of info prompted for is an integer, and the second prompt asks for a floating number. I am trying to send the program "3\n" to satisfy the first...
47
3885
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
2
5313
by: Yandos | last post by:
Hello php gurus, maybe it sounds crazy, but I'd would like to use php for some system administration, backups, etc, but sometimes user interaction is needed. Till now i have been using windows script host, but more and more I need communication with intranet servers, which works fine with libcurl. Now I'm executing curl.exe for every intranet request I need, and it's too slow. My question is, if I can read keyboard using php. I know i...
4
20143
by: My SQL | last post by:
Hi Can I trigger an external program to run when a new record is added to the mysql table? The external program is in C and instead of scanning the table continuously for new insertions, it will be better if an external program could be triggered. Any suggestions?
2
6900
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no service required. But... "A windows service enables the creation of long-running executable
2
5332
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
5
1309
by: ge0193387 | last post by:
We're trying to get people to use our e-mail instead of people's outside e-mail (g-mail, hotmail) since the local e-mail is used for official correspondence. What I'm wanting to do is get information from our e-mail server (New Messages?, how many new messages?, maybe an abstract of the message?, and etc). So far I haven't found much on Google on how to do any of this. I'd rather not use the outlook object unless I have to due to...
0
2147
by: Omar Abid | last post by:
Reason of this project: The Microsoft.VisualBasic.Interaction class exposes many useful commands and methods that were available in Visual Basic like AppActivate, Beep, Callbyname... This tutorial shows how to work with some of them. Project details: 1- From VB 6.0 to VB .net 2.0 2- Useful interaction commands 3- Samples of interaction commands
2
2717
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib rpcrt4.lib ole32.lib oleaut32.lib uuid.lib Creating library libsq00.lib and object libsq00.exp libq00.lib(ootb.obj) : error LNK2019: unresolved external symbol _ldap_unbind@4
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.