Hi,

Detail:
Language: C++
OS: Unix based, DOS/Windows
Status: Begginer

Q/

How do I comunicate 2 diferent app, what I want is to call one program from another one, and get an answer from the second one, maybe send another call depending on the answer.

For example, comunicate with mysql, send a query and see the result. I know that there are Libraries for this specific task, but I whant to know how to do it in general.

I have seen some people recomending Sockets, Pipes and Standard I/O library, wich one do you think is the right one?
I´m not plannig yet to stablish communication between two or more computers, every app would be running in the same machine.

Thanks in advance.

Do you write both apps, or is one a commercial or existing app?

For example, you can chat with Excel via its COM interface, so that decides the question for you.

If you write both apps, maybe consider writing the common stuff using DLLs so you can share the same code. Or making one big app.

No, I only write one of the apps.

I think DLL is for windows only, if so I need somethig that is OS independent.

So what does this other platform-independent app take as input? Does it support only text files? sockets? All of the above? Seems like that is where you have to start: what does the other app work with?

Ok.
I´ve been working with mysql in both, linux and windows.
But I have to start the server from the comand line.
I don´t like opening the CLI every time that I want to start or stop the server.
So I would like to make a small GUI app (I have the tools for the GUI already) that will let me with the click of a button start or stop the server at my will.
Plus, I want to be able to pass some arguments to the server, like user & pwd.

Sometimes there will be some errors starting the server and sometimes not.

So I would require two things:
a) to be able to pass this arguments to mysql server.
b) be able to see the answer that the mysql server is returning in case of any errors.

If I need to create text files, or sockets or anything, so be it.

I kow I´m not been very clear in what the app will do, but as I said, I´m learning on my own, so I´m making my own homework, this is just somethig that I thought it be nice to star with.

Thanks.

This article has been dead for over six months. Start a new discussion instead.