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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working whith 2 .exe's (and

Status
Not open for further replies.

guber

Programmer
Jan 4, 2002
27
US
I have 2 exe's. Program1.exe and Program2.exe

From Program1.exe I call Program2.exe with parameters...
("C:\Program2.exe Par1 Par2")

and I execute: ShellandWait "C:\Program2.exe Par1 Par2"
(I use Par1 and Par2 with the Command$ variable...)

when Program2.exe finish, I have to pass the return to Program1.exe.

How I do this ??

Thanks any help,
Guber

 
Make Program 2 a dll instead of an executible.

have a function in program2 like returnResultsOfProgram2 and return the results.


Now you have program1 doing this instead

Dim myProgram2 as new program2
dim HereIsTheResult as variant

hereIsTheResult = myProgram2.returnResultsOfProgram2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top