I want t beable to use the batch file "ERRORLEVEL" based on the return value of my program.
My program looks something like this:
int main(void)
{
If (x == TRUE)
return 1;
else
return 0;
return 0;
}
Based on that it should return the value. So when i call the command in my batch file:
@a:\mycprogram.exe
if errorlevel 0 goto Abort
if errorlevel 1 goto Next
As of now, it seems to not return a value, because I can use any errorlevel 1-??, and it will proceed. If anyne can help I woul appreciate it.
Thanks in advance,
Rhobbs
Start Free Trial