Discussion Locked

Call app from VB and get results

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi, I have a C++ command line app which when executed returns an integer value. I am trying to run this app from VB and display the return value and thought I could do something like:
retval = Shell("C:\test\dssLEN.exe", 1)
but it just returns a program id. Is there a way to get the integer value returned from the application?
Thanks,
Ron Utsogn

3 replies

by earona

Try to call a .bat , in .bat:
dssLEN.exe > Test.txt
And then read test.txt file to get resuts.
Or
retval = Shell("C:\test\dssLEN.exe > Test.txt", 1)
And then read test.txt file to get resuts.
This is the easier way.

I wish that they'll begood for you
Exequiel Arona

This discussion is closed to new replies.