Login  
Search All Forums
Dart Home | PowerTCP Zip Compression for Active | Custom Development Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
AuthorForum: PowerTCP Zip Compression for ActiveX
Topic: new zip file does not get created
briankvd

From: Colorado Sprngs, CO USA
Posts: 4
Member Since: 06/12/07
posted March 30, 2009 7:09 PM

I'm using the ActiveX ZIP component. I am using the FileStore and trying to add a file, then save the file. It doesn't create any file though. If I use QuickZip, it works. But eventually I will need FileStore.Zip to work. Here is my code.

IZip* ZipComp=0;
CoInitialize(NULL);
HRESULT hr=CoCreateInstance(CLSID_Zip, NULL, CLSCTX_INPROC_SERVER, IID_IZip, (LPVOID*)&ZipComp);
if (!SUCCEEDED(hr)) {
MessageDlg("Unable to create a ZIP object to use for opening/editing the zip file : "+EDITzipdownload->Text,mtError, TMsgDlgButtons() << mbOK, 0);
return ;
}
try {
 ZipComp->FileStore->Add(EXEEdit->Text,false,true,"",zipNoEncryption);
 ISpanSettingsPtr span;
 ZipComp->FileStore->Zip("c:\\temp.zip", span);
} catch (...) {
 ShowMessage("ERROR");
}
ZipComp->Release();
CoUninitialize();

Thanks for any help.

Brian
Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted March 31, 2009 3:41 PM

I modified the DZip Sample that ships with the current version of the product by replacing the call to QuickZip in the HandleZip() function with the following code:
Zipper->FileStore->Add("test.file",false,false,"",DartZip::zipNoEncryption);
Zipper->FileStore->Zip(ZipFileName,false);

The above worked fine for me. That being said, the sample uses a wrapper for IZip that we provide.

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Zip Compression for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX