Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? How Return a string to another program ?

Status
Not open for further replies.

Pontelo

Programmer
Dec 18, 2001
80
BR
Hi people !
X.EXE calls Y.exe. When Y.EXE terminates I need to return
a String to X.EXE.
What I need to do to return this string ?
X.EXE is a clipper program and Y.EXE is a Delphi program.
 
Create a temp txt file in which you will write the string you need to pass from one program to another.

Passing and returning strings work well using an exe and dll's but within exe's??? And the caller is a clipper program...???... Good luck!
 
people have any idea ! don´t you think rcloutie ?
thanks for your attention. we´ll use files if we don´t find
a way to pass data directly.
 
I remember researching a technique to copy data from one Delphi application to another several years ago. I've managed to find the thread (thread102-402462). I know this isn't exactly what you requested but maybe it'll give you some ideas.

Hope this helps!

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
I saw a thread here yesterday giving 3 ideas, file, environment variable e passing messages, as Stretchwickster said above. I´m not seeing this thread anymore (was deleted?).
Environment variable is a good idea. We used SetEnvironmentVariable() function. When you activate a child process it creates a copy of environment variables.
You can change its values but when you return theses values are lost, i.e., you cannot return back a value.
The easiest way, seems to me, is create a file. Although not so elegant, works. We´ll implement some like this :
X.EXE will call Y.EXE passing filename to create ( Y.EXE somefilename )
Y.EXE will process and write the string to somefilename.
X.EXE will open somefilename and read the string.
Thak You All for the attention !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top