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

Return value of the shell function..

Status
Not open for further replies.

jeffmoore

Programmer
Aug 29, 2003
301
US
Okay so I have the shell function start an application and get it's return value in a variable call TaskID.
The program I'm calling is going to start and autoexecute a macro, do it's thing and exit.
Q: How do I tell when the called program is done executing?
What value does my variable return after the program is done?
TIA
Jeff
 
If you need to pause your program until the process is complete, then you might want to try the suggestion that I offered in the following thread:

thread705-667547

With respect to the return value, you can get your other program to return a number (Long Integer) by using the ExitProcess API when the program terminates. If you use the technique from the referenced thread, then RetVal will contain the value passed to the ExitProcess API from the other program.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top