Skip to content

Instantly share code, notes, and snippets.

/.cxx Secret
Created Feb 1, 2018

Embed
What would you like to do?
#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
You can’t perform that action at this time.