I have a need that requires a VFP exe to return a so-called "ERRORLEVEL" value.
I have performed the following but it does not work:
*-- My exe's initial prg looks something like this
SET SYSMENU TO
SET EXCLUSIVE OFF
SET CENTURY ON
PUBLIC m.gnRetCode && Global return code
m.gnRetCode = 0 && Initialize return code
DO FORM frmTest && Global code will be set here
*-- The Form will execute CLEAR EVENTS upon completion
READ EVENTS
*-- I am assuming this is the way to return the ERROR LEVEL
RETURN( m.gnRetCode )
Thanks in advance