I'm using the latest version FoxBin2Prg v1.19.42.
When using the convertion from text to binary file (prg2bin) with an external command, errors are not returned properly to the calling command.
You can reproduce the error by downloading the attached file "_errorreport.zip", unpacking it and running the batch script runfoxbin2prg.cmd.
The third test (subdirectory test3) tries to compile the text version of a simple form and fails.
Comments: ** Comment from web user: ralfxwagner **
Hello Fernando,
concerning your post from last Wednesday:
>ExitProcess(1) && Esta debe ser de las últimas instrucciones
>
>.....so I don't understand why ExitProcess(1) is not returning error code 1 always in your tests o_O
Both program executions (test 3 and 4) run until ExitProcess(1).
For testing , I've even added a MessageBox just before ExitProcess(1), which is shown in both cases.
But for test #3 the execution before ExitProcess is different: test 3 just writes to the error log and does not call ERROR, which test #4 does, so I suppose that the code that is performed by adding ERROR "real error 2" to the execution of test 3 changes something so that ExitProcess can return the actual status.
I suppose this is similar to setting SCREEN=ON in the beginning (which is of course no actual solution to the problem).
BTW: There seems to be an inconsistent behaviour between BIN2PRG and PRG2BIN.
When I try to decompile a invalid FoxPro file with BIN2PRG, I
1. get an error dialog from foxbin2prg, then
2. the error file is displayed in notepad by foxbin2prg and
3. then I get the proper exit status.
When I call foxbin2prg with PRG2BIN-SIMERR_I1 the sequence is the same (MessageBox, error file in notepad, proper return status.
If I just call foxbin2prg with PRG2BIN and an invalid text file, I don't get #1 and #2 but just the error status.
I'm not sure if this is intentional that the Messagebox is not shown and the error file is not displayed, but should foxbin2prg not behave similar for BIN2PRG and PRG2BIN?
Regars Ralf