Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value to Windows
Message
 
To
02/03/1999 20:56:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00193397
Message ID:
00193461
Views:
13
>How do I go about returning a value (such as a success or failure) to Windows from a VFP 5 exe?
>Is this possible?
>Many thanks
>John

John,
VFP will always return a zero indicating that it shut down successfully. This is not much use. You can override this behavior by using the Win32 API. for example to return the error code in gnErrorLevel
DECLARE ExitProcess IN Win32API INTEGER ExitCode
ExitProcess(gnErrorLevel)
This code bypasses all the VFP shutdown code and forces the process to exit immediately. You need to make sure you do all the cleanup before calling ExitProcess (like closing open files, etc.)
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform