VB Program return Code

Is there a way to let a VB program return a result code on exit?

I need this for cooperation with Plus! system Agent which want's that programs give a return code on exit.
schneiddAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
vbstoneConnect With a Mentor Commented:
I believe that the original poster is correct, there is no way to provide a return code directly.  But what you can do is a sneaky hack to do it.  Before your VB app terminates, have it write the return code in a file somewhere on your disk, such as an .ini file.  Then write a C++ .exe which executes your VB app, and when the VB app returns, have the C++ app read the file for the return code.  Then it should return that code itself.  Finally, have your original app shell to the C++ code!
0
 
Pechatnikov MichaelCommented:
Hello !
I think that,
In Visual Basic You Have app object and it have all properties
of your application.

You have only one way to terminate your application, it`s End & Stop Statements and it`s cann`t return any value (Like in C++ for example)


I suggest you to look in Help about 'app' object and all it`s properties.
I`m sorry, I`m now in other computer so I haven`t visual Basic here and can`t to check it myself.

0
 
vbstoneCommented:
I know how to do it.  Email me when the question is no longer locked.
0
 
schneiddAuthor Commented:
Hey vbstone,

would like to e-mail to you, but couldn't find your e-mail adress here. (This is my first attemt to use Exp.Exchng., so maybe i do something wrong) Please e-mail me the solution to schneidd@silyn.net

thanks
0
 
Pechatnikov MichaelCommented:
My Email ls Msoft@netmedia.net.il
Thanks,
            Pechatnikov Michael

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.