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: How to capture events using DartZip ActiveX
briankvd

From: Colorado Sprngs, CO USA
Posts: 4
Member Since: 06/12/07
posted June 11, 2008 3:20 PM

I am using Dart zip in CBuilder environment. I am trying to use it as a COM object, with the following code

IZip* ZipComp=0;
CoInitialize(NULL);  // Initialize the COM library
HRESULT hr=CoCreateInstance(CLSID_Zip, NULL,                     CLSCTX_INPROC_SERVER,             IID_IZip,
(LPVOID*)&ZipComp);
ZipComp->QuickZip((WideString)localfile, (WideString)remotefile,0,1,NULL,0);
        ZipComp->Release();


My question is, how do I know if there was an error or warning during the execution of the QuickZip function

THANKS for the help, Brian
Jason Farrar (Admin)

From: USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted June 11, 2008 5:23 PM

If an error occurs then an exception is thrown back to the executing code.

If a warning occurs it is stored in the File object for each file that it applies to. So what you have to do is loop through the FileStore array of the archive object and check the WarningText property of each File object in the FileStore array.

The Error event is designed to be used for asynchronous operations.
briankvd

From: Colorado Sprngs, CO USA
Posts: 4
Member Since: 06/12/07
posted June 11, 2008 5:28 PM

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