Skip to content

Instantly share code, notes, and snippets.

/.cxx Secret

Created February 1, 2018 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ba579ad89b578dd9126c0994fba527da to your computer and use it in GitHub Desktop.
Save anonymous/ba579ad89b578dd9126c0994fba527da to your computer and use it in GitHub Desktop.
#include <CkZip.h>
void ChilkatSample(void){
CkZip zip;
bool success;
// Any string unlocks the component for the 1st 30-days.
success = zip.UnlockComponent("Anything for 30-day trial");
if (success != true) {
SERVER_PRINT(UTIL_VarArgs("\n1 %s\n",zip.lastErrorText()));
return;
}
success = zip.NewZip("test.zip");
if (success != true) {
SERVER_PRINT(UTIL_VarArgs("\n2 %s\n",zip.lastErrorText()));
return;
}
bool recurse = true;
success = zip.AppendFiles("../*",recurse);zip.put_IgnoreAccessDenied(true);
if (success != true) {
SERVER_PRINT(UTIL_VarArgs("\n3 %s\n",zip.lastErrorText()));
return;
}
bool success2 = zip.WriteZipAndClose();
if (success2 != true) {
SERVER_PRINT(UTIL_VarArgs("\n4 %s\n",zip.lastErrorText()));
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment