Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 6th, 2005, 4:17 PM   #1
Kazy
Newbie
 
Join Date: Sep 2005
Posts: 21
Rep Power: 0 Kazy is on a distinguished road
Inter-program Communication

I need to communicate between two seperate programs. One will read in data from the user, and the second program will take that data and output it. Easy enough, only I'm trying to figure out the most effective ways to do this. I can either:

1) Write the data read in from the 1st program to a file, then read it in from the 2nd program. The problem with this is I'm not sure how the 2nd program will know when there is txt written to the file.

2) Use shared memory. I've never done this before, and not exactly sure where to get information on how it would be done.

3) Use a socket, although I need to do things locally without using networks or IP's addresses.

Basically I'm just looking to be pointed in the right direction for the most effective way to do such a thing. This is the first time I've ever done inter-program communication. Suggestions please!
Kazy is offline   Reply With Quote
Old Sep 6th, 2005, 4:22 PM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 5 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
option 1 is the easiest way, option 2 is the most efficient way, there's nothing wrong with option 3 although when it's on a local machine it basically becomes option 1. Search google for some examples.
-Dizz
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Sep 6th, 2005, 4:23 PM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
What about pipes? Iself have no experience with them, google.com .

Please do not double post
Polyphemus_ is offline   Reply With Quote
Old Sep 6th, 2005, 4:28 PM   #4
Kazy
Newbie
 
Join Date: Sep 2005
Posts: 21
Rep Power: 0 Kazy is on a distinguished road
In doing option one, how would my 2nd program know when there is data to read in? Thanks for the help!
Kazy is offline   Reply With Quote
Old Sep 6th, 2005, 4:31 PM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
using a semaphore? once again, use google, i only know the theories
Polyphemus_ is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:14 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC