Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a VFP exe
Message
From
15/04/2000 07:13:38
 
 
To
14/04/2000 19:26:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00359172
Message ID:
00359999
Views:
8
>>Create a VFP COM server, and instance the server from VBScript - you can make method calls and use standard returns and parameter passing. You can't 'return' a value (other than an error level code) on program termination, and that's limited to integer values. THe COM server handles this, by publishing an interface that the VBScript can address.
>
>Hmmm.
>
>
>
>Ick.
>
>Not at Ed's comment - he's right - but at the need for that methodology. I've spent time in the Unix environment, and the ability too throw around parameters and expect return codes in scripts is irreplaceable, IMHO. As it is, I've developed a way for any VFP .exe to accept Unix-style parameters (like tar or grep do), and it's part of my personal base classes.
>

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.

>It was very fun to create, and it fits right in my scripting model (I use Tcl/Tk, which is much more flexible than any comparable method that Microsoft has come up with - it takes the macro model of VFP and extend it to it's logical extreme).
>
>
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform