Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I get a VFP exe to return a return code
Message
From
16/08/1998 06:01:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00126877
Message ID:
00127193
Views:
28
>>*-- I am assuming this is the way to return the ERROR LEVEL
>>RETURN( m.gnRetCode )
>>
>
>Instead of QUIT/CANCEL/RETURN to exit from VFP, add the following code:
>
>

>
>DECLARE ExitProcess IN Win32API INTEGER ExitCode
>
>After closing down everything, execute the following line of code:
>
> =ExitProcess(nReturnCode)
>
>where nReturnCode is the error level you want to return.

This question was asked several times here, and this is the first time (AFAIK) there was a good answer to it. Could you post a FAQ on this, for the benefit of generations to come?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform