Subject Two problems/questions with GBAK
Author Joe Martinez
I'm trying to call GBAK from my application to provide a backup
function. I am using FB 1.0, and calling GBAK.EXE via WinExec().

Problems:

1) If I use the -Y switch to redirect the output to a file, that only
works if the specified output file does not already exist. If it
already exists, it neither overwrites nor appends to the file. It just
does nothing with the output. Is there any way of making it overwrite
the file?

2) I believe I read in a previous post, that in Windows, you could read
the return value from GBAK to see if the backup was successful or not.
When I call WinExec, I always get the same return value (33), whether
the backup was successful or not. According to the Win32 reference, a
return code greater than 31 means success, but I'm guessing that that's
only telling me that it successfully called GBAK. It seems to be saying
nothing about the actual return code from GBAK. How can I get that?

Thanks,
Joe