// Visual C++ Example Source Code to create a Zip file
//
#include "stdafx.h"
#include "CkZip.h"
#include "CkZipEntry.h"
void testCreateZip(void)
{
// Unlock the Zip product.
// This only needs to be done once when the first CkZip object
// is instantiated. Any string automatically starts a fully-functional
// 30-day trial.
CkZip zip;
bool success = zip.UnlockComponent("Anything for 30-day trial.");
if (!success)
{
printf("%s\n",zip.lastErrorText());
return;
}
// Create a new Zip and append files and directories recursively.
zip.NewZip("myZip.zip");
success = zip.AppendFiles("./Tree/*",true,0);
if (!success)
{
printf("%s\n",zip.lastErrorText());
return;
}
success = zip.WriteZipAndClose(0);
if (!success)
{
printf("%s\n",zip.lastErrorText());
return;
}
// Memory Leaks? See CkSettings for more information about how
// many C++ programmers mistakenly think there are memory leaks.
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
testCreateZip();
return 0;
}
jest to przykład ze strony http://www.example-code.com/vcpp/vcCreateZip.asp dotyczacy biblioteki do kompresji
pytanie można jakoś zdobyć i załatwić sprawe z tym stdafx.h pisze w eclipsie pod windowsem