Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a VFP exe
Message
From
13/04/2000 11:05:16
 
 
To
13/04/2000 08:03:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00359172
Message ID:
00359289
Views:
10
>Hi,
>
>I've been asked to write a VFP program which will accept some parameters and return a value to the calling program.
>
>The calling program will be written in VBScript.
>
>Getting my VFP exe to accept the parameters is fine, but I can't see how to return the value [which will be a simple character string].
>
>For instance, the complete main program in my project looks like this:
>
>parameters lctablename
>wait window lctablename
>return lctablename
>
>If I run this in VFP, the wait window displays ok, but I get a syntax error on the return.
>
>This is in VFP 6.0 with SP3. Anyone got any ideas ? Also, are there any problems with calling a VFP exe with parameters from VBScript.
>

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.
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