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

program return value

Status
Not open for further replies.

jges

Technical User
Oct 24, 2003
537
US
Can a VB program return a value to the operating system upon completion?

Here is my problem:
I'm writing some macros for a CAD program that I use and I could really use the standard open file dialog box. The macro language is rather outdated and contains no such functionality, but it will allow me to call an external .exe and use its return value. I'd like to write a simple VB program to show the file open dialog box and return the value to the calling program.

I'm aware that c/c++ can return a value, but I only know enough c++ to be dangerous (I'd much rather use VB if possible).
 
What exactly do you mean by return value of an EXE?

Do you mean the text that is returned by a DOS command line program like ftp.exe or net.exe?

If so, then you want to do is make a console program with VB.
 
What exactly do you mean by return value of an EXE?

For example, in c++ you have the main function which controls flow of your program, when the exe is done doing its thing the main function returns a value to the operating system (which i believe is generally used for success/error codes).

I'm not familiar with ftp.exe or net.exe, so I'm not sure how to answer that.

Thanks for the heads up about console programs, seems to be the right direction. In my searching I've found out how to pass command line parameters to the program, but I have not seen an example of returning a value from the program. Do you have any specific examples/resources/links to recommend?

Thanks for your time and consideration.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top