Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exiting VFP returning an error level
Message
From
30/11/1999 11:08:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Exiting VFP returning an error level
Miscellaneous
Thread ID:
00296903
Message ID:
00296903
Views:
61
Based on the info I found in the FAQ (#443 by Ed Rouh), I tried creating a RetTest.exe and and associated BAT file to capture an error level. Can anyone suggest what I might be doing wrong as no matter what I do, there does not appear to be anything returned. I say this because my BAT file always echos "Nothing was returned". Any suggestions would be greatly appreciated.

TIA - Isaac

Here is my prg and bat files ...

************************************************
** RetTest - Testing for returned error level
LOCAL lnReturnVal
lnReturnVal = 1
DECLARE ExitProcess in Win32API INTEGER ExitCode
=ExitProcess(lnReturnVal)
RETURN
************************************************


REM Here is my bat file called test.bat
@echo off

RetTest
goto answer%ERRORLEVEL%

:answer0
echo Zero was returned
goto end

:answer1
echo Negative one was returned
goto end

:answer
echo Nothing was returned
goto end

:end
Next
Reply
Map
View

Click here to load this message in the networking platform