c/c++ programs communicating with eachother

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2005
Posts: 8
Reputation: bertlef is an unknown quantity at this point 
Solved Threads: 0
bertlef bertlef is offline Offline
Newbie Poster

c/c++ programs communicating with eachother

 
0
  #1
Jan 12th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 436
Reputation: Chainsaw is an unknown quantity at this point 
Solved Threads: 11
Chainsaw's Avatar
Chainsaw Chainsaw is offline Offline
Unprevaricator

Re: c/c++ programs communicating with eachother

 
0
  #2
Jan 12th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 8
Reputation: bertlef is an unknown quantity at this point 
Solved Threads: 0
bertlef bertlef is offline Offline
Newbie Poster

Re: c/c++ programs communicating with eachother

 
0
  #3
Jan 12th, 2005
No, I only write one of the apps.

I think DLL is for windows only, if so I need somethig that is OS independent.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 436
Reputation: Chainsaw is an unknown quantity at this point 
Solved Threads: 11
Chainsaw's Avatar
Chainsaw Chainsaw is offline Offline
Unprevaricator

Re: c/c++ programs communicating with eachother

 
0
  #4
Jan 12th, 2005
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?
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 8
Reputation: bertlef is an unknown quantity at this point 
Solved Threads: 0
bertlef bertlef is offline Offline
Newbie Poster

Re: c/c++ programs communicating with eachother

 
0
  #5
Jan 12th, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC