>If all you need is to terminate VFP and return a numeric status code, that's no problem, too - use the ExitProcess() API call to terminate VFP, and have it return an error code other than 0. Only integer values can be returned. There is a sample in the FAQ showing this.
Could you provide a link to the FAQ or write out an example? I couldn't track down what you were referring to, besides the API call itself.
A typical Tcl/Tk snippet might read like this:
if {[exec MyVfpApp.exe -xf somefile.txt]} {
---> set mystring "This is a test"
}
where [exec MyVfpApp.exe -xf somefile.txt] executes a command (the exec command, in this case) and substitutes its return code - note that the square brackes are what denote the substutution.
exec's return code is the return code of the process it is executing - in this case, I am assuming that MyVfpApp.exe returns a zero for false and a non-zero for true.
I also added three parameters (two flags and a positional) to demonstrate typical Unix-style parameter passing.
What I want to know is whether executing ExitProcess() will properly return an integer in this manner, and how I would integrate this in my framework's shutdown routine.