I found faq184-145 by ChrisRChamerlain and found it very informative. The compression portion of cabarc seems to be working just fine. However, I am having trouble with the extract side.
I am using cabarc with VFP5.0 to compress all data tables as part of my user selected backup/restore routine. I am not very well versed in the use of winexec and am getting a return code of 33 during the extract or restore routine but the files are not extracted nor restored. Perhaps my problem is more in not understanding how to handle API calls.
The portion of code that applies is:
*use getfile() to return user selected backup cab file to restore from...
cCurBackUp = getfile([cab])
* example of selected file->A:\backup-04-13-2003-211.cab
IF cCurBackUp = ' '
=messagebox('No file found. Files were not restored.',0)
RETURN
ENDIF
*kitchen is the directory where the main app and data lives
lcProg2Run = [CABARC x &cCurBackUp c:\kitchen\]
DECLARE INTEGER WinExec IN kernel32 ;
STRING lpCmdLine ,;
INTEGER uCmdShow
IF !WinExec(lcProg2Run, 0) > 31
= MESSAGEBOX('This should have extracted files to the....',0)
ENDIF
Does anyone have a listing of return codes and meanings for this use of WinExec()?
Can anyone shed some light on why the files are not being extracted?
Thanks,
George
I am using cabarc with VFP5.0 to compress all data tables as part of my user selected backup/restore routine. I am not very well versed in the use of winexec and am getting a return code of 33 during the extract or restore routine but the files are not extracted nor restored. Perhaps my problem is more in not understanding how to handle API calls.
The portion of code that applies is:
*use getfile() to return user selected backup cab file to restore from...
cCurBackUp = getfile([cab])
* example of selected file->A:\backup-04-13-2003-211.cab
IF cCurBackUp = ' '
=messagebox('No file found. Files were not restored.',0)
RETURN
ENDIF
*kitchen is the directory where the main app and data lives
lcProg2Run = [CABARC x &cCurBackUp c:\kitchen\]
DECLARE INTEGER WinExec IN kernel32 ;
STRING lpCmdLine ,;
INTEGER uCmdShow
IF !WinExec(lcProg2Run, 0) > 31
= MESSAGEBOX('This should have extracted files to the....',0)
ENDIF
Does anyone have a listing of return codes and meanings for this use of WinExec()?
Can anyone shed some light on why the files are not being extracted?
Thanks,
George