We help IT Professionals succeed at work.
Get Started

VB.Net - Call External EXE with Return value

Jimbo99999
Jimbo99999 asked
on
979 Views
Last Modified: 2015-11-03
Good Day Experts!

I am not sure how to accomplish the end task for my project.  I am calling an exe using the following code from a testing project which will mimic calling from a current production project.

Dim pHelp as New ProcessStartInfo
phelp.FileName = "C:\Testing\WindowsApplication5.exe"
pHelp.Arguments = "44070,44145,21"
pHelp.UseShellExecute = False
pHelp.WindowsStyle = ProcessWindowStyle.Normal
Dim proc as Process = Process.Start(Help)

The exe produces the mileage between 2 zipcodes.  I have the mileage showing in a messagebox coded in the exe.

The trouble I have now is that I cannot figure out how to get that mileage returned back to my calling testing project.
The code from the exe is contained in Sub Main() within Module MainMod.  

Can you offer any suggestions?

Thanks for the help,
jimbo99999
Comment
Watch Question
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
This problem has been solved!
Unlock 2 Answers and 6 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE