Polar Zip Light Component Introduction

Introduction

1. What is Polar Zip Light?
2. Where can Polar Zip Light be used?
3. Current features

1. What is Polar Zip Light?

Polar Zip Light is the most advanced yet easy-to-use compression tool available. It is a single, fully self-contained ActiveX component written entirely in VC++ 6.0 with ATL 3.0.

Polar Zip Light is specifically designed to meet all the zipping and unzipping requirements that you may have. It includes a 32-bit ActiveX control (OCX) with numerous functions that give your application the power to create, extract, list, and generate password protected zip files.

2. Where can Polar Zip Light be used?

Polar Zip Light is ideal for:

    • zipping or unzipping files on demand;

    • packaging files ready for distribution;

    • automating backups;

    • compressing your application data files, no matter if you use it on your desktop computer, computer network (intranet) or Internet server.

3. Current features

  1. Zip actions

    • Create a new zip file;

    • Delete files in a zip file;

    • Compress entire directories and their contents or a list of directories;

  2. Unzip Actions

    • Decompress files from a zip file;

    • Specify the directory where files will be decompressed to;

  3. General zip information

    • Obtain a detailed list of files in a zip file;

    • Use wildcards to specify the files to be processed;

    • Specify the name and location of a zip file;

    • Events provide data such as the file size before compression, the compressed file size and other information as it becomes available;

  4. General process information

    • Set the compression level;

    • All operations can be aborted;

    • Notifies your application whenever a file is being zipped, unzipped, deleted, etc.;

    • Provides the status of the progress by file and globally with the data shown as percentages, bytes and file counts;

    • You can easily update your progress bars directly with this information;


What's inside?

What is inside this component?

1. What do you get within the Polar Zip Light Component?
2. What does the installation of Polar Zip Light include?
3. Redistributing applications
4. Attention!

1. What do you get within the Polar ZIP Component?

In both cases, whether you are installing the trial or the release version, you will get all the needed files with all the available functions. The trial version will put the '.trial' extesion on the first file in the archive.

2. What does the installation of the Polar Zip Light Component include?

Polar ZIP Components:

  • PolarZIPLight.dll Polar Zip Light ActiveX control (Installed in WIN/SYS directory)

Polar ZIP Documentation:

  • PolarZipLight.chm Developer's on-line Documentation

  • License.txt License agreement

  • ReadMe.txt Information about installation, registration, etc.

Polar ZIP Sample Files:

  • Source code for the samples written in Visual Basic 6.0 (using ActiveX)

  • Source code for the sample written in Visual C++ 6.0 (using ActiveX)

  • Source code for the sample written in Borland Delphi (using ActiveX)

  • Source code for the ASP Sample

Demo Browser (for easier browsing through the samples)

3. Redistributing applications

The table below shows all the files necessary for the Polar ActiveX controls to operate properly. If you have purchased the Polar Zip Light Component and are deploying an application, you must ensure that the first three groups of the files listed below exist on your client's machine and are the proper version.

If your client's machine has older versions, they should be updated.

1. PolarZIPLight.dll
2. OLE32.DLL
OLEAUT32.DLL

3. KERNEL32.DLL
USER32.DLL
GDI32.DLL
SHELL32.DLL
ADVAPI32.DLL

4. Attention!

PolarZIPLight.dll is the Polar Zip Light Component's re-distributable file. This file may be in the Windows system directory, in the computer's path or for WinNT and Win95, in the directory specified by your application's Per Application Path key in the Registry Database. The .OCX file must be registered on each user's machine. The Polar Zip Light Component Setup program registers the OCXs on your development machine.

To register an OCX on the user's machine, use the REGSVR32.EXE utility, which is available from Microsoft. To run this utility, type in the following at the command prompt on each user's machine:

regsvr32 filename

The second group of files are Microsoft re-distributable files necessary for the ActiveX control to operate. Your programming environment should have installed and registered these files. If they were not installed or they are older versions, the Polar Zip Light Component installer updated and registered them. Copy these files from your development machine to your user's machine.

Our ActiveX controls require OLE2 support to be installed on a machine. In order to run an application containing one of our controls you must ensure OLE2 has been installed on the user's machine. The third group of files in the table list are the OLE2 files accessed by the Polar Zip Light Component. Normally, copying these files to the user machine is all that is required.

The fourth group of files should be present on any system running Windows. You should not remove or update these files. They are included only to form a complete list of files needed to use the Polar Zip Light Component.


What about compatibility?

ZIP file format compatibility

Polar ZIP Light is 100% compatible with the latest zip file format. ZIP files created by Polar Zip Light can be used by PKZip 2.04g and vice-versa. All Polar Zip Light features are accessible through simple properties, methods and events, just like the components you are already used to working with.

Compatibility with different development tools

Polar Zip Light works with all major Windows™ development languages and platforms including:

    • MS Visual Basic,

    • MS Visual C++,

    • MS Visual InterDev,

    • MS Access,

    • MS FoxPro for Windows,

    • Microsoft Office,

    • Borland Delphi,

    • Borland C++Builder,

    • PowerBuilder,

    • Any other 32-bit visual programming environment that supports ActiveX technology,

    • It can also be used in web scripting languages, your ASP and DCOM projects, regardless of what developing tool you are using for web development.

Trademarks

Microsoft, Windows, MS Visual C++, MS Word, MS Excel, MS FoxPro, MS Internet Explorer, ASP, MS Visual Basic, MS Office, ActiveX, .NET, Visual Studio .NET, are registered trademarks of Microsoft Corporation. Inprise, Borland, Borland C++Builder, Borland Delphi are registered trademarks of Inprise Corporation, PowerBuilder is registered trademark of Sybase, Inc. or its subsidiaries.


ZIP compression format

ZIP archive format

The ZIP archive format is probably the most popular compression and archiving file format used. Use Polar Zip Light to create and manipulate industry-standard ZIP archives in a second, with only a few lines of code!

1. What is a ZIP file?
2. Can you tell me more about the ZIP archive format?
3. Why do people use ZIP files?

1. What is a ZIP file?

ZIP files are archives used for distributing and storing files and may contain one or more files. Usually the files archived in a ZIP file are compressed to save space.

2. Can you tell me more about the ZIP archive format?

The ZIP archive format is the most common and the most popular archive format. It was introduced by PKWARE in the late 1980's as a response to the compression needs of the computer market. Their product PKZIP not only introduced the ZIP file format but it also brought a reliable alternative to the plethora of compression utilities on the market in those times.

The speed and amount of compression, flexibility, robustness, and reliability PKZIP possessed, prompted many to convert their archives to the ZIP file format virtually overnight. Another big reason for the success was the decision by PKWARE to dedicate the ZIP file format specification and ZIP file extension name to the public domain.

The decision to keep the ZIP file format an open standard allowed many other zipping programs to join the market, as well as many software components supporting this standard as well. With Polar Zip Light you can create and manipulate industry-standard ZIP archives in a second, with only a few lines of code!

3. Why do people use ZIP files?

ZIP files save time and space and make downloading software and transferring e-mail attachments faster. Typical uses for ZIP files include:

Easier upload/download
Most archive files available on FTP & web sites are distributed as ZIP archives. Two benefits of using archives for electronic file distribution are that only one file transfer operation (download) is required to obtain all related files and the file transfer time is minimized because the files in an archive are compressed.

Easier distribution
It is often useful to send a group of related files to an associate. Rather than distributing individual files it is often easier to distribute the files as an archive to benefit from the file grouping and compression.

Easier archiving
Some files are important but used infrequently. To save disk space simply compress these files into an archive when they are not used and decompress them only when needed.


Technical support

We are doing our best to keep our support pages and all our support services informative and versatile. As you can see, there are various ways you can communicate with us and with other Polar Zip Light users.

Polar ZIP Light homepage
Request a feature
Report a problem
Web forum
eNewsletter

Polar Zip Light home page

This is the starting page for all Polar Zip Light users. Get the latest info on Polar Zip Light and learn about exciting new features and updates.
www.polarsoftware.com/products/zip/index.html

Request a feature

Please feel free to let us know if you find some particular feature appealing or if you you need a feature that is not already provided.
www.polarsoftware.com/support/feature/index.html

Report a problem

Have problems using Polar ZIP? If you cannot find an answer to your specific problem in this help file, please feel free to contact us:
www.polarsoftware.com/support/problem/index.html

Web forum

A great meeting place for all Polar customers. Enrich your knowledge base on Polar ZIP and meet other Polar development gurus on-line!
www.polarsoftware.com/support/forum/index.asp

eNewsletter

Like to hear news right from the source? Then we invite you to subscribe to our free e-mail newsletter. Published monthly, the Polar eNewsletter contains the latest news about Polar software products, services, tips & handy suggestions, special events at our web site as well as promotional offers.
www.polarsoftware.com/support/newsletter/index.html


Getting started in Microsoft Visual Basic

Getting Started ...

With the Microsoft Visual Basic

In order to insert the Polar Zip Light ActiveX Control in your project, follow these steps:

  1. Install the component on your system by starting its setup program.

  2. In the Visual Basic compiler IDE, create a new project or open an existing one.

  3. Click the right mouse button over the Toolbox toolbar to get the popup menu.

  4. In the menu choose the "Components" option to start the dialog box.

  5. Find the "Polar ZIPLight 5.0 ActiveX Control" in the dialog box's list of available controls, and select the check-box on it's right.

  6. Click "OK" to leave the dialog box.

  7. Now you should see the icon representing the control that you chose on a Toolbox toolbar. You can use the control just like any other Windows control.

  8. Draw the control onto the dialog resource as a child control or manually add the member object onto your dialog form.


Getting started in Microsoft Visual C++

Getting Started ...

With the Microsoft Visual C++

In order to insert the Polar Zip Light ActiveX Control in your project, follow these steps:

  1. Install the component into your system by starting its setup program.

  2. In the Visual C++ compiler IDE, create a new project or open an existing one.

  3. From the "Project" menu select "Add To Project" / "Components and Controls".

  4. In the "Registered ActiveX Controls" directory select " Polar Zip Light Component".

  5. Click the "Insert" button.

  6. Click "OK" on the next dialog box. The compiler will insert the control into your project and will generate its wrapper classes.

  7. Click the "Close" button if you want to finish adding the controls to your project.

  8. You can now use the control just like any other Windows control.

  9. In the Resource Editor Components toolbar, you should see an icon representing the Polar Zip Light ActiveX control. You can either draw the control onto the dialog resource as a child control or you can manually add a member object onto your dialog form.


Getting started in Borland Delphi

Getting Started ...

With the Borland Delphi

In order to the insert Polar Zip Light ActiveX Control into your project, follow these steps:

  1. Install the component on your system by starting its setup program.

  2. In the Borland Delphi compiler IDE, create a new project or open an existing one.

  3. In the main menu choose the "Component" / "Import ActiveX control" option to start the dialog box.

  4. Find the "Polar ZIPLight 5.0 ActiveX Control" in the dialog box's list of available controls and select it.

  5. Click the "Install" button.

  6. In the next dialog box that appears click "OK".

  7. In the next dialog box that appears click "OK" to rebuild the package.

  8. After the package is built, you have to close two more dialogs by clicking "OK".

  9. You should now see an icon on the Component Palette in the ActiveX component's tab representing the chosen control.

  10. You can no use the control just like any other Windows control.

  11. Draw the control onto the dialog resource as a child control or manually add the member object onto your dialog form.


Getting started in Borland C++ Builder

Getting Started ...

With the Borland C++ Builder

In order to insert the Polar Zip Light ActiveX Control into your project, follow these steps:

  1. Install the component on your system by starting its setup program.

  2. In the Borland Builder compiler IDE create a new project or open an existing one.

  3. In the main menu choose the "Component" / "Import ActiveX control" option to start the dialog box.

  4. Find the "Polar ZIPLight 5.0 ActiveX Control" in dialog box's list of available controls and select it.

  5. Click the "Install" button.

  6. In the next dialog box that appears click "OK".

  7. In the next dialog box that appears click "Yes" to rebuild the package.

  8. After the package is built, you have to close one more dialog box by clicking "OK".

  9. You should now see an icon on the Component Palette in the ActiveX component's tab representing the chosen control.

  10. You can now use the control just like any other Windows control.

  11. Draw the control onto the dialog resource as a child control or manually add the member object onto your dialog forms


ZIPLight Object

The ZIPLight object represents the control, and does all the compression operations.

Properties

AllowErrorReporting Property

CompressionLevel Property

ExtractDirectory Property

FilesToExclude Property

FilesToProcess Property

Overwrite Property

Password Property

RecurseSubDirectories Property

SourceDirectory Property

ZipFileName Property

Methods

Add Method

Delete Method

Extract Method

List Method

Events

FileInfo Event

FileStatus Event

OnError Event

ProcessEnded Event

ProcessStarted Event

List of the enumerations

pzePolarZipErrorConstants


AllowErrorReporting Property

Determines whether errors will be automatically reported or ignored.

Syntax

object.AllowErrorReporting [ = value] As Boolean

Parameters

object - ZIPLight

value - Constant representing whether errors are to be reported.

Settings

The settings for AllowErrorReporting are:

False = Error reporting is disabled.

True = Error reporting is enabled.

Remarks

If this property is set to TRUE, errors can be caught (in VB with the On Error).

Default value of this property is FALSE (the Error event will still fire in this case).

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.ExtractDirectory = "c:\temp\dir2"
ZipLight1.AllowErrorReporting=True
ZipLight1.Add
ZipLight1.Extract

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object


CompressionLevel Property

Sets or returns the level of data compression.

Syntax

object.CompressionLevel[ = level] As Long

Parameters

object - ZIPLight

level - A numeric expression indicating the compression level (Can range between 0 and 9)

Remarks

Default value of this property is 6. If CompressionLevel is set to zero, there will be no compression.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.FilesToProcess = "*"
ZipLight1.ExtractDirectory = "c:\temp\dir2"
ZipLight1.CompressionLevel=3
ZipLight1.Extract

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Exit Sub

End If

See Also

ZipLight Object


ExtractDirectory Property

Defines the path and name of the directory that you want to extract your zip file to.

Syntax

object.ExtractDirectory[ = string] As String

Parameters

object - ZIPLight

string - A string expression defining the extracting directory

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.FilesToProcess = "*"
ZipLight1.ExtractDirectory = "c:\temp\dir2"
ZipLight1.Extract

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error
 # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object, SourceDirectory Property


FilesToExclude Property

The FilesToExclude property lets you exclude specific files or folders from the list of files to be processed and provided to the FilesToProcess property.

Syntax

object.FilesToExclude[ = string] As String

Parameters

object - ZIPLight

string - A string expression defining the files to be processed

Remarks

FilesToExclude includes either file names or wildcards. Multiple wildcards or file names have to be separated by a pipe "|". If you want all files to be included, the FilesToExclude property has to be set to " * " or to "*.*".

Example

ZipLight1.FilesToExclude = "my docs\d.txt | my docs\a.txt"
ZipLight1.FilesToExclude = "*.txt"
ZipLight1.FilesToExclude = FilesToExclude + "|"
ZipLight1.FilesToExclude = FilesToExclude + "*.doc"

See Also

ZipLight Object, FilesToProcess Property


FilesToProcess Property

The FilesToProcess property is used to provide a list of files or folders to be processed by the Zip control.

Syntax

object.FilesToProcess[ = string] As String

Parameters

object - ZIPLight

string - A string expression defining the files to be processed

Remarks

FilesToProcess includes either file names or wildcards. Multiple wildcards or file names have to be separated by a pipe "|". If you want all files to be included, the FilesToProcess property has to be set to " * " or to "*.*". You can read more on path storing in the How to store paths topic.

Example

ZipLight1.FilesToProcess = "my docs\d.txt | my docs\a.txt"
ZipLight1.FilesToProcess = "*.txt"
ZipLight1.FilesToProcess = FilesToProcess + "|"
ZipLight1.FilesToProcess = FilesToProcess + "*.doc"

See Also

ZipLight Object, FilesToExclude Property


Overwrite Property

Specifies whether existing files are going to be overwritten during decompression.

Syntax

object.Overwrite[ = value] As Boolean

Parameters

object - ZIPLight

value - A Boolean expression indicating the overwrite state

Settings

True - Existing files will be replaced by new ones.

False - Existing files will not be replaced by new ones.

Remarks

Default value of this property is False.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.FilesToProcess = "*"
ZipLight1.ExtractDirectory = "c:\temp\dir2"
ZipLight1.Overwrite=True
ZipLight1.Extract

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object


Password Property

Sets the password that will be used for zipping or unzipping.

Syntax

object.Password[ = string] As String

Parameters

object - ZIPLight

string - A string expression containing the password

Remarks

If the Password is set to "" (default) no password protection will be used, otherwise the content of the zip archive will be encrypted with specified password.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Password="PolarZIP"
ZipLight1.Add

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object


RecurseSubDirectories Property

Specifies if files in the subdirectories of the source directory will be included in the process. (See SourceDirectory)

Syntax

object.RecurseSubDirectories[ = value] As Boolean

Parameters

object - ZIPLight

value - A Boolean expression indicating whether the process is recursive

Settings

True - All subdirectories of the source directory will be included in the process.

False - Subdirectories of the source directory will not be included in the process.

Remarks

Default value of this property is True.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.RecurseSubDirectories =True
ZipLight1.Add

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object, ExtractDirectory Property, SourceDirectory Property


SourceDirectory Property

Specifies the full path to the source directory of files that will be included in the process.

Syntax

object.SourceDirectory[ = string] As String

Parameters

object - ZIPLight

string - A string expression representing the name and the full path to the source directory

Remarks

If this property is left as an empty string, the source directory for processing will be the current directory. You can read more on path storing in the How to store paths.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Add

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object, ExtractDirectory Property


ZipFileName Property

Sets or returns the name of the zip file, including the full path.

Syntax

object.ZipFileName[ = string] As String

Parameters

object - ZIPLight

string - A string expression specifying the zip file name and path

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Add

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
Exit Sub

End If

See Also

ZipLight Object


Add Method

Use this method to start the zip operation.

Syntax

Function Add() As Long

Return value

Zero if the zip operation finished successfully, otherwise the number of the error that occurred.

Remarks

Files to be listed are defined through the FilesToProcess and the FilesToExclude properties.

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Add

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Exit Sub

End If

See Also

ZipLight Object, Delete Method, Extract Method


Delete Method

Use this method to delete specified files from an archive.

Syntax

Function Delete () As Long

Return value

Zero if the zip operation finished successfully or the number of the error that occurred if it did not.

Remarks

Files to be listed are defined through the FilesToProcess and the FilesToExclude properties (if you want to delete all files in the arhive, make sure to set FilesToProcess property to "*").

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Add
ZipLight1.FilesToProcess = "filename"
ZipLight1.Delete

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Exit Sub

End If

See Also

ZipLight Object, Add Method,Extract Method


Extract Method

Use this method to start the unzip operation.

Syntax

Function Extract() As Long

Return value

Zero if the unzip operation finished successfully or the number of the error that occurred if it did not.

Remarks

Files to be listed are defined through the FilesToProcess and the FilesToExclude properties (if you want to extract all files in the arhive, make sure to set FilesToProcess property to "*").

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.FilesToProcess = "*"
ZipLight1.ExtractDirectory = "c:\temp\dir2"
ZipLight1.Extract

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Exit Sub

End If

See Also

ZipLight Object, Add Method, Delete Method


List Method

This action is used to get the list of files that are inside a zip file. The FileInfo event will be called for every file listed.

Syntax

Function List () As Long

Return value

Zero if the zip operation finished successfully, otherwise the number of the error that occurred.

Remarks

Files to be listed are defined through the FilesToProcess and the FilesToExclude properties (if you want to list all files in the arhive, make sure to set FilesToProcess property to "*")

Example

On Error GoTo ErrorHandler

ZipLight1.ZipFileName = "c:\temp\test.zip"
ZipLight1.SourceDirectory = "c:\temp\dir1"
ZipLight1.FilesToProcess = "*"
ZipLight1.Add
ZipLight1.List

ErrorHandler: ' Error-handling routine.

If Err.Number <> 0 Then

Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Exit Sub

End If

Private Sub ZIPLight1_FileInfo(ByVal sFilename As String, ByVal sComment As String, ByVal lSize As Long, ByVal lCompressedSize As Long, ByVal lCompressionRatio As Long, ByVal lCrc32 As Long, ByVal dtLastModified As Date, ByVal bEncrypted As Boolean)

MsgBox sFilename

End Sub

See Also

ZipLight Object, Add Method


FileInfo Event

This event occurs if the List method is executed. It is useful for getting information about files included in the zip file specified by the ZipFileName property.

Syntax

PolarZip_FileInfo(sFilename As String, sComment As String, lSize As Long, lCompressedSize As Long, lCompressionRatio As Long, lCrc32 As Long, dtLastModified As Date, bEncrypted As Boolean)

Parameters

sFileName - String expression containing the name of file.

sComment - String expression containing the file comment

lSize - Number of the expression representing the original file size

lCompressedSize - Number of the expression containing the file size after compression (expressed in bytes)

lCompressionRatio - Number of the expression containing the compression ratio (If lSize = 100, and lCompressedSize = 30, lCompressionRatio = 70)

lCrc32 - The CRC value of the data. The provided checksum is the industry standard CRC-32 checksum used by the Zip format and the Zmodem communications protocol

dtLastModified - Date and time of the last modification ( in the DATE format)

bEncrypted - Boolean expression (TRUE if a file is protected with a password, otherwise FALSE)

Remarks

This event is affected by the FilesToProcess and FilesToExclude properties.

See Also

ZipLight Object, FileStatus Event, OnError Event


FileStatus Event

This event occurs during the processing of the file (zipping/unzipping/deleting), as a result of the processing progress.

Syntax

PolarZip_FileStatus(sFilename As String, lSize As Long, lCompressedSize As Long, FilePercent As Double, TotalPercent As Double, bFileCompleted As Boolean, pAbort As Boolean)

Parameters

sFilename - String expression containing the path and the filename of the file processed ( when zipping, this is the path and filename of the file exactly as it is being stored in the zip file. When unzipping or testing, this is the path and filename of the file exactly as it is currently stored in the zip file)

lSize - Number of the expression representing the original file size

lCompressedSize - Number of the expression representing the compressed file size

FilePercent - Number of the expression representing the ratio of the currently processed file part and total file size, expressed in percentages.

TotalPercent - Number of the expression representing ratio of the currently processed file size and total processing file size, expressed in percents

bFileCompleted - Boolean expression representing the status of the processing (TRUE if the processing is finished (last call of the FileStatus event), otherwise FALSE )

pAbort - A boolean expression indicating whether the process will be terminated. You need to set this parameter to TRUE in order to abort the ongoing process.

Remarks

This event gives you the status of the progress by file and globally in percentages, bytes and file counts. You can update your progress bars directly with this information.

Example

Dim fAbort As Boolean

Private Sub btnAbort_Click()

fAbort = True ’Clicking on button Abort, user sets the flag fAbort to True.

End Sub

Private Sub ZIPLight1_FileStatus(ByVal sFilename As String, ByVal lSize As Long, ByVal lCompressedSize As Long, ByVal FilePercent As Double, ByVal TotalPercent As Double, ByVal bFileCompleted As Boolean, pAbort As Boolean)

DoEvents

pAbort = fAbort ‘Every event FileStatus, checks the flag fAbort. If it’s True, Polar ZIP Light will receive process termination massage

End Sub

See Also

ZipLight Object, FileInfo Event, OnError Event


OnError Event

Error Event

This event is called when the error occurs.

Syntax

PolarZIP_Error(ErrorCode As pzePolarZipErrorConstants, ErrorDesc As String)

Part Description

ErrorCode - A pzePolarZipErrorConstants enumeration value defining the error number

ErrorDescription - String containing the error description

See Also

ZipLight Object, FileInfo Event, FileStatus Event


ProcessEnded Event

This event occurs when the process of zipping or unzipping ends.

Syntax

PolarZIP_ProcessEnded()

See Also

ZipLight Object, ProcessStarted Event


ProcessStartedEvent

This event occurs when the process of zipping or unzipping starts.

Syntax

PolarZip_ProcessStarted()

See Also

ZipLight Object, ProcessEnded Event


Create Simple Zip Files.

Polar Zip Light starts zipping when you call the Add method, but before that, you must specify:

FilesToProcess | defines which files will be added to the archive (bmp, jpeg, exe, all...)
SourceDirectory | the location of the files that are going to be added to the archive (full path of directory)
ZipFileName | the location of the archive (full path)

Example

ZipLight1.FilesToProcess = "*.bmp | *.wmf"
ZipLight1.SourceDirectory = "C:\MyPictures"
ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"
ZipLight1.Add

Note

You can also set many other useful properties for example:

RecurseSubDirectories | if you want to zip files from subdirectories of the source directory
Password | when you want to create a password protected file


Unzip an Existing Archive.

Polar Zip Light starts unzipping when you call the Extract method, but before that you must specify:

FilesToProcess | define which files will be extracted from the archive
ExtractDirectory | the location where the files will be extracted (full path of directory)
ZipFileName | the location of the archive (full path)

Example

ZipLight1.FilesToProcess = "*.bmp"
ZipLight1.ExtractDirectory = "C:\Temp"
ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"
ZipLight1.Extract

Note

You can also set many other useful properties for example:

Overwrite

defines whether the files that already exist in the extract directory (with the same names) will be overwritten


List Zip Content

List the Contents of a Zip file.

To list the contents of the zip file, follow these instructions:

  1. Set the ZipFileName to the name of the archive,

  2. Call the List method. This method will 'read' the zip file and at each file, the FileInfo event will be triggered.

  3. You must catch this event and display or save the needed information.

Example

Private Sub Form_Load()
ZipLight1.ZipFileName = "c:\temp\blobs.zip"
ZipLight1.List
End Sub

Private Sub ZIPLight1_FileInfo(ByVal sFilename As String, ByVal sComment As String, ByVal lSize As Long, ByVal lCompressedSize As Long, ByVal lCompressionRatio As Long, ByVal lCrc32 As Long, ByVal dtLastModified As Date, ByVal bEncrypted As Boolean)

MsgBox sFilename

End Sub


ASP sample

Use Polar Zip Light on a web server.

The Polar Zip Light 'package' also provides you with a sample ASP file. This simple ASP script can be used even on your server! All you have to do is:

  • Register the PolarZIPLight.dll on the server machine

  • Copy the sample into your server's root directory

  • Give IUSR_MACHINE user write permission on this dir

  • Try it!

The ASP sample shows you how to use the Polar Zip Light component to backup files on your server. It lists files that are currently present in your server's root directory. The user can select the files that are going to be added to an archive and can choose the name of the archive. The selected files will be zipped and available for download!

This sample can be used for creating backups or even for interactive delivery to users of your site. Let your users decide what they want to download!

Note

We designed the sample with the server's root as the Source directory. You can easily change this:
Instead of:

strSourceDir = Server.MapPath ("/")

You can choose any other subdirectory you want to use:

strSourceDir = Server.MapPath ("/MySub")

NOTE: do not forget to copy the zip.asp page in the root of MySub!


Control registering

Q: I tried to install your demo file (PolarZIPLight.dll) without your install package and the ActiveX file does not work (if I install it with: regsvr32 PolarZIPLight.dll). If I buy the release version, is it possible to install it without your installation software?

A: Re-distribution of the Polar Zip Light ActiveX control is explained in the ReadMe file (comes with the installation).

Q: I downloaded Polar Zip Light, ran the Setup and copied the PolarZIPLight.dll to winnt\system32. I have loaded all the required DLL's but I still got the following problem: Could not register the ActiveX control. Received "specified module could not be found".

A: There are a few possible causes and solutions:

  1. When you copied the control to the WIN\SYS directory, it is possible that you removed the control from the directory where it was installed. It should not be removed from this directory because the Windows search for the control uses registry entries which contain the control's path, unlike with DLLs which must be located into the system directory. If you moved the control, you have to re-register it in a new directory.

  2. If you just made a new copy of the PolarZIPLight.dll in WIN\SYS and registered it, it is possible that the previous copy of the Polar Zip Light OCX remained registered (because the setup procedure registered Polar Zip Light in its own directory during the installation). You have to unregister this copy.

Q: If I want to upgrade my existing ActiveX control, what will happen after I download and install the new version? Is it going to overwrite existing files or will it exist as a new version?

A: When you install the new version, you can choose a different folder to install in. However, the new version will be registered and your system will only recognize this registered one. You can keep two different versions of the control on your computer but you must keep in mind that you must register the control manually each time you wish to switch from one version to another.

Q: I would like to incorporate your Zip functionality in my program, but I do not know:

  1. What I can distribute to my potential users,

  2. How I would get InstallShield to register the OCX.

A:

a) When re-distributing the Polar Zip Light Release version, you can only redistribute the PolarZIPLight.dll.

Finally, in order for the Polar Zip Light OCX to work properly on the customer's machine, he must have the following file installed:

PolarZIPLight.dll
The .OCX file must be registered on each user's machine. To register an OCX on the user machine, use the REGSVR32.EXE utility. This utility is available from Microsoft. To run this utility, type the following at the command prompt on each user's machine:

Regsvr32 filename

Our ActiveX controls requires OLE2 support to be installed on a machine. In order to run an application containing one of our controls you must ensure that OLE2 has been installed on the user's machine. If your client's machine has older versions of these files, you will need to update them.

You can also read about the redistribution of files in the ReadMe.txt.

b) You can manually add the function for the registration into the script file (setup.rul):

Note: This function will work if the REGSVR32.EXE is in the windows/system directory!

/*-------------------------------------------------------------------

RegisterOCX

Registration of OCX

-------------------------------------------------------------------*/

function RegisterOCX()

STRING svOCXPath;

begin

// Registration of OCX

svOCXPath = svTargetDir ^ "PolarZIPLight.dll";

LongPathToShortPath( svOCXPath );

LaunchAppAndWait(WINSYSDIR^"regsvr32.exe", "/s " + svOCXPath, WAIT);

end;


Troubleshooting

Q: How can I zip files using Polar Zip Light? I tried the Add method but nothing happened.

A: You probably did not set all the required properties. Polar Zip Light starts zipping when you call the Add() method but before that, you must specify:

FilesToProcess
SourceDirectory
ZipFileName

define which files will be added to the archive (bmp, jpeg, exe, all...)
the location of files that are going to be added to the archive (full path of directory)
the location of the archive (full path)

Example:

ZipLight1.FilesToProcess
 = "*.bmp *.wmf"
ZipLight1.SourceDirectory = "C:\MyPictures"
ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"
ZipLight1.Add()

Q: Which properties have to be set before unzipping?

A: Polar Zip Light starts unzipping when you call the Extract() method but before that, you must specify:

FilesToProcess
ExtractDirectory
ZipFileName

define which files will be extracted from the archive
the location where the files will be extracted (full path of directory)
the location of the archive (full path)

Example:

ZipLight1.FilesToProcess = "*.bmp"
ZipLight1.ExtractDirectory = "C:\Temp"
ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"
ZipLight1.Extract()

You can also set many other useful properties. For example:

Overwrite

defines whether files that already exist in the extract directory (with the same names) will be overwritten

plus various others.

Q: The control returns an error 12 when performing the Add method. The "nothing to do" does not tell me what I am doing wrong.

A: "Nothing to do" means that Polar Zip Light did not find any files of the specified pattern (Look at the value of FilesToProcess) in the SourceDirectory.

You can check either the FilesToProcess property, the SourceDirectory property or the RecurseSubDirectories property value. (Subdirectories of your SourceDirectory may contain the specified mask, but you might not have let zip know that it must look in the subdirectories).

Q: I have a trial copy of Polar Zip Light and I cannot create a zip file. Is this a problem with my program or is this a limitation of the trial version?

Here is the VB code I am using:

frmSendQuote.ZipLight1.SourceDirectory = sTempDir
frmSendQuote.ZipLight1.CompressionLevel = 6
frmSendQuote.ZipLight1.ZipFileName = "QUOTES.zip"
frmSendQuote.ZipLight1.FilesToProcess = " " & sFileList
frmSendQuote.ZipLight1.Add

A: The only limitation of the trail version is nagging screens so there problem is with your code. From the sample code I am not sure how sFileList looks but the main problem is probably the parameter

frmSendQuote.ZipLight1.ZipFileName = "QUOTES.zip"

The ZipFileName has to be the name of the zip file, including the full path. You wrote only the filename and that fires the OnError event with the description "ZIP file path does not exist". Provide Polar Zip Light with the control's full zip path (and file name) and the zip will be created in a moment.

Q: I am trying to get a list of all the files in a zip file and then to write them to a string. However, I cannot find how to get the list of files in the zip. I have looked at polZip_List but I do not know how to use it.

A: To list the zip contents, follow these instructions:

  • Call the Extract method. This method will 'read' the zip file and at each file, the FileInfo event will be triggered.

  • You must catch this event and display or save the needed information.

It's as simple as that!

Q: Do you support, or are you planning to support the Windows CE platform?

A: Unfortunately, Polar Zip Light does not support the Windows CE platform. We have no plans for it in the near future but we are open to all suggestions.

Q: Before extracting, I want to check for a virus. Is there any option or interface for an existing virus scanner in my computer? My computer virus scanner might detect a virus when I try to decompress a file using Polar Zip Light, but this program I'm trying to write will be unattended. I do not know how to handle it if virus was detected. Does Polar Zip Light have some sort of interface that returns a status or warning for viruses?

A: There are no options in Polar Zip Light for interfacing with a virus checker. You can call the virus checker after the decompressing to check for viruses and if the file is infected, take the appropriate actions (warning, delete..).

Q: What are the file and archive size restrictions when using the component? We are looking for a way to archive data, without having to deal with archive size restrictions.

A: Restrictions of the size and the number of files contained in an archive exist and they are: 2GB, and 65000 files per archive. Those restrictions are there due to compatibility with PKZIP. Unfortunately, we must keep those restrictions to stay compatible with other zipping tools.

The workaround would be to make a multi-file archive where each archive can be 2GB long. Be cautious when doing this because Polar ZIP enables you to make a multi-file archive on one disk (non-removable) and on multiple disks.

Your best option would be to choose removable disks because when you create a multi-file archive on a non-removable disk, you will not be able to extract it until you merge those into one file, which will be impossible if each file has the max size.

Q: One of my zipped documents cannot be extracted from the file. I created a "New Text Document.txt" in the root of my zip path, opened and revised it, and have been unable to extract it from the file. Other zip utilities (WinZip) have been able to extract the file. All other files seem to extract very nicely. What is the problem?

A: That file is probably the only one containing a space in the file name, which explains why it was not extracted while all the others were. You must be careful when defining the FilesToProcess value as all masks that contain spaces must be in quotation marks to be understood as one mask.

Q: What form of error checking does your zip component use Adler32 or CRC32)?

A: Our Zip is uses CRC32 for error checking.

Q: Can Polar Zip Light extract or list archives with the following file extensions *. and *.arc?

A: Unfortunately, Polar Zip Light can only deal with zip archives that are compatible with the PKZIP format.


Trial version

Q: What are the limitations of the trial version?

A: The trial versions of all our components are completely functional. This means that you can use all the functionality in the trial version as well as in the release version. The trial version will put the '.trial' extesion on the first file in the archive.

Q: I am using the trial versions to evaluate your product but I need technical support. Do you offer technical support for trial version software?

A: Yes, we do. Our support team is ready to help anyone but we must remind you that our registered customers are always served first.

Q: I am using the trial version to evaluate your product. Will you consider my opinions, suggestions, pros and cons regarding your product's performance?

A: Yes. Whether you are a registered customer or a newcomer, we will consider all your suggestions seriously and will try to enhance our product to the best of our ability. We look forward to any feedback you may have - positive or negative.


Order and payment

Q: How can I order your product?

A: You can order Polar products on-line at www.polarsoftware.com, by e-mail at sales@polarsoftware.com or via our resellers. You can find more info about our resellers at www.polarsoftware.com/about/resellers.html. However, if you have special queries with regards to ordering, please feel free to contact our sales department at sales@polarsoftware.com at anytime.

Q: What types of payment do you accept?

A: You can pay using credit cards: Visa, MasterCard & American Express; by Wire Transfer and by (Company) Check. Feel free to contact our sales department at sales@polarsoftware.com at anytime.

Q: How do you deliver your products?

A: Polar software products are only available through ESD.

Q: If I buy the component now, will I be entitled to the coming versions at no extra cost?

A: Minor build versions (e.q. 5.1, 5.2, ...) will be free for anyone who owns a registered copy of the last major version. Newer major versions (6.0, 7.0, ...) will be available at a discounted upgrade price.

Q: What about a FREE UPGRADE to a major version?

A: Customers who purchased Polar Zip Light within 20 days of the release date of the new Polar Zip Light major version will get a 20 day grace period to claim their FREE UPGRADE!

Q: Are the number of licenses or quantities of copies referring to developers or to end users of the software that contains the Polar Zip Light component within it?

A: The number of licenses refers to the number of developer's machines and one software license is required per developer's machine. Re-distribution with your application is royalty free. There are no royalty fees for any of our components.

Contact us:

Polar
Put Supavla 1
HR-21000 Split
Croatia, Europe

Phone:
Fax:
URL:

E-mail:

+385 21 380 770
+385 21 380 771
www.polarsoftware.com


License agreement

You can find the Polar License agreement on-line at www.polarsoftware.com/products/license.html

Polar – Single User License Agreement

Important
You should read the following terms and conditions carefully. By installing the Polar software package you indicate your acceptance of them.

By installing this software package (the "SOFTWARE"), or exercising your rights to make and use copies of the SOFTWARE (as may be provided for below), or pressing the 'Accept' button below, you agree to be bound by the terms of this Polar License Agreement. If you do not agree to the terms of this Agreement, you are not allowed to use the SOFTWARE. If you would like specific rights not granted in this agreement, please contact Polar for more information.

Polar Software License Agreement

The enclosed software, including, but not limited to, one or more of the following: source code, object code, dynamic link libraries, static libraries, header files, sample programs, utility programs, Makefiles and scripts, together with the accompanying documentation (collectively known as the "SOFTWARE") is owned by Polar or its suppliers and is protected by international copyright laws and treaties.

Therefore, you must treat the SOFTWARE like any copyrighted material (e.g., a book or musical recording) except that you may make either:

    • one backup copy of the SOFTWARE solely for backup purposes, or

    • transfer the SOFTWARE to a hard disk and keep the original copy solely for backup purposes.

Polar grants to you (one software programmer) the limited right to use only one copy of the SOFTWARE on a single computer (typically one personal computer) in the manner set forth in this agreement. Each Software Programmer must have his or her own license to use the SOFTWARE.

The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. THE SOFTWARE PRODUCT IS LICENSED, NOT SOLD.

License - You May:

  1. Use the SOFTWARE on a single computer for purposes of developing application programs. The SOFTWARE is "in use" on a computer when it is loaded into temporary memory or installed into permanent memory of such computer. Installation on a network server for the sole purpose of internal distribution does not constitute "use" requiring a development license, but you must have a separate license for each computer on the network used for developing applications programs. Application programs include but are not limited to programs and HTML pages.

  2. Distribute an unlimited number of copies of the DLL, VBX or OCX files as part of the application developed using the Software provided the conditions described in paragraph 2.1 are met. 2.1 The application must include proper copyright notification for the SOFTWARE. The copyright notice must be included with any copyright notice for the including application or at least once in the user interface, and in the printed and electronic documentation, and packaging. The copyright notification must be worded similar to the following: This product contains PRODUCT from Polar. Copyright © 1998-2001. All rights reserved. Substitute the name of the included SOFTWARE for PRODUCT (i.e. Polar Zip Light Component).

  3. Make one copy of the SOFTWARE for backup or archival purposes or copy the SOFTWARE to a single permanent storage medium provided you keep the original solely for backup or archival purposes.

  4. Combine the run time portion of the SOFTWARE with your software program for use subject to the restrictions set forth in Subparagraphs (1) and (2) above. Any portion of the SOFTWARE distributed with your program will continue to be subject to the terms and conditions of this License. You must reproduce and include the Polar copyright notice on any copy or merged portion of the SOFTWARE.

  5. Permanently transfer the SOFTWARE together with this License to another party, but only if the other party agrees to accept the terms and conditions of this Agreement. If you transfer the SOFTWARE and License, you must at the same time notify Polar of the name and address of the transferee. You also must either transfer all copies, merged portions, upgrades and prior versions of the SOFTWARE, together with all SOFTWARE documentation, to the same party or destroy those not transferred. Any such transfer terminates your License.

  6. Modify (i.e. modify the source code and rebuild) the dynamic link libraries and statically linked libraries and incorporate the modified dynamic link libraries and statically linked libraries into software application products that you develop.

  7. Make and distribute copies of the dynamic link libraries and statically linked libraries of the SOFTWARE as incorporated into software application products that you develop provided that the SOFTWARE, or other Polar products, do not constitute a major portion of the value of your product.

  8. Solely with respect to electronic documents, you may make an unlimited number of copies (either in hardcopy or electronic form), provided that such copies shall be used only for internal purposes and are not republished or distributed beyond the licensee's premises.

  9. Use and modify the source code version of those portions of the SOFTWARE that are identified in the documentation as the Sample Code ("SAMPLE CODE"), provided you do not distribute the SAMPLE CODE, or any modified version of the SAMPLE CODE, in source code form.

Prohibited uses - You May Not

  1. RENT, LEASE, OR LEND THE SOFTWARE OR SOFTWARE DOCUMENTATION.

  2. OTHERWISE TRANSFER OR USE, COPY, OR MERGE THE SOFTWARE,IN WHOLE OR IN PART, EXCEPT AS EXPRESSLY PERMITTED IN THIS LICENSE.

  3. MODIFY, DECOMPILE, DISASSEMBLE, REVERSE ENGINEER OR TRANSLATE THE SOFTWARE.

  4. REPRODUCE, MODIFY OR TRANSLATE THE SOFTWARE DOCUMENTATION.

  5. REMOVE ANY PROPRIETARY NOTICES, LABELS OR MARKS ON THE SOFTWARE OR SOFTWARE DOCUMENTATION.

  6. DEVELOP OR DISTRIBUTE APPLICATIONS THAT PROVIDE DIRECT ACCESS TO THE SOFTWARE'S PROGRAMMING INTERFACE.

  7. BUNDLE THE SOFTWARE IN A DEVELOPMENT ENVIRONMENT.

  8. USE THE SOFTWARE TO CREATE AN APPLICATION THAT IS NOT SIGNIFICANTLY DIFFERENT THAN THE VBX/DLL OR OCX.

  9. SEPARATION OF COMPONENTS. THE SOFTWARE PRODUCT IS LICENSED AS A SINGLE PRODUCT. ITS COMPONENT PARTS MAY NOT BE SEPARATED FOR USE ON MORE THAN ONE COMPUTER.

  10. EXPOSE THE INTERFACES OF THE SOFTWARE THROUGH YOUR APPLICATION. (e.g. an OCX, DLL, class library, etc.)

The source codes of the SOFTWARE are valuable assets of Polar. You agree to keep all source codes of the SOFTWARE in confidence. You may not transfer or assign the SOFTWARE or your rights under this agreement.

Term

You may terminate your License and this Agreement at anytime by destroying the SOFTWARE and SOFTWARE documentation together with all copies in any form. They will also terminate automatically if you fail to comply with any term or condition of this Agreement, in which event you agree to destroy the SOFTWARE and SOFTWARE documentation together with all copies in any form, and to provide us upon our request with written certification of such destruction.

Limited Warranty/Limitation of Remedies

EXCEPT AS SPECIFICALLY STATED IN THIS AGREEMENT, THE SOFTWARE AND SOFTWARE DOCUMENTATION IS PROVIDED AND LICENSED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Limitation of liability

IN NO EVENT WILL POLAR BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION LOST PROFITS OR REVENUES, LOSS OF DATA, BUSINESS INTERRUPTION LOSS, RECOVERY OR SUBSTITUTION COSTS, OR CLAIMS BY THIRD PARTIES, OR OTHER INDIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF POLAR OR A POLAR DEALER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL POLAR'S LIABILITY EXCEED THE AMOUNT OF THE LICENSE FEE PAID BY YOU FOR THE SOFTWARE.

High Risk Activities

The SOFTWARE is not fault-tolerant and is not designed, manufactured or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the Software could lead directly to death, personal injury, or severe physical or environmental damage ("High Risk Activities"). Polar and its suppliers specifically disclaim any express or implied warranty of fitness for High Risk Activities.

Technical Support

Polar will provide you (the original licensee only) with limited technical support by electronic media for a period of 60 days after delivery of the SOFTWARE to you. You can use your technical support rights by contacting us:

    • using e-mail: support@polarsoftware.com

    • using support web forms on our web site at www.polarsoftware.com

General

This agreement is governed by international copyright laws and treaties. The prevailing party in any action or proceeding brought in connection with a breach of this Agreement will be entitled to reimbursement by the other party for costs and reasonable attorneys' fees. Any questions concerning this Agreement should be referred in writing to Polar (see our address on top of this agreement).

Copyright Notice

Copyright © 1998-2001 Polar and/or its suppliers, Polar, Put Supavla 1, HR-21000 Split, Croatia, Europe. All rights reserved. Specifications subject to change without notice. Any rights not expressly granted herein are reserved. You acknowledge that you have read this agreement, and by installing this software package indicate your acceptance of its terms and conditions. You also agree that it is the complete agreement between us and that it supersedes any prior information or representations you received relating to the subject matter of this agreement. No Polar dealer, distributor representative or employee is authorized to make any modifications or additions to this agreement.

Polar
Put Supavla 1
HR-21000 Split
Croatia, Europe

Phone:
Fax:
URL:

E-mail:

+385 21 380 770
+385 21 380 771
www.polarsoftware.com


pcmCompressionMethod

pcmCompressionMethod enumeration

pcmCompressionMethod

{

pcmStored(0) - no compression
pcmlDeflated(8) - compressed

}


pfaFileAttributes

pfaFileAttributes enumeration

pfaFileAttributes

{

pfaNone (0) - No specific attributes must be on in order to process files.
pfaReadOnly (1) - Read-only attribute required.
pfaHidden (2) - Hidden attribute required.
pfaSystem (4) - System attribute required.
pfaVolume (8) - Volume Label attribute required.
pfaFolder (16) - Folder / directory attribute required.
pfaArchive (32) - Archive bit attribute required.
pfaNormal(128) - Normal attribute required.
pfaTemporary(256) - Temporary attribute required.
pfaEncrypted(64) - Encrypted attribute required.
pfaCompressed(2048) - Compressed attribute required

}


pfbSfxExistingFileBehavior

pfbSfxExistingFileBehavior enumeration

pfbSfxExistingFileBehavior

{

pfbSfx_SKIP (1) - skip if file exists.
pfbSfx_OVERWRITE (2) - overwite if file exists.

}


pzePolarZipErrorConstants

pzePolarZipErrorConstants enumeration

pzePolarZipErrorConstants

{

pzeErrorNone(0) - "No errors"
pzeUnexpectedEnd(202) - "Unexpected end of zip file"
pzeErrorGeneric(203) - "A generic error in the zipfile format was detected. Processing may havecompleted successfully anyway; some broken zipfiles created by other archivers have simple work-arounds"

pzeErrorNoMem(204) - "Unable to allocate memory for one or more buffers during programinitialization"
pzeErrorSevere(205) - "A severe error in the zipfile format was detected. Processing probably failed immediately"

pzeErrorTooLarge(206) - "Entry too large to be split with zipsplit"
pzeErrorInvalidComment(207) - "Invalid comment format"
pzeErrorTestFailed(208) - "TestArchive failed or out of memory"
pzeErrorTempFile(210) - "Encountered an error while using a temp"
pzeErrorReadSeek(211) - "Read or seek error"
pzeErrorNothingToDo(212) - "Nothing to do"
pzeErrorMissingZip(213) "Missing or empty zip file"
pzeErrorWriting(214) - "Error writing to a file"
pzeErrorCreate(215) - "Unable to create a file to write to"
pzeErrorBadParam(216) - "Bad parameters"
pzeErrorOpen(217) - "Could not open a specified file to read"
pzeErrorNoZip(218) - "ZIP file not specified or invalid"
pzeErrorSourceDir (219) - "Source directory does not exist"
pzeErrorTempPath(220) - "Temporary path does not exist"
pzeErrorZipPath(221) - "ZIP file path does not exist"
pzeErrorUnknown(222) - "Unknown error"
pzeErrorUnzipGeneric(224) - "A generic error in the zipfile format was detected. Processing may have completed successfully anyway; some broken zipfiles created by other archivers have simple workarounds."

pzeErrorUnzipSevere(225) - "A severe error in the zipfile format was detected. Processing probably failed immediately."

pzeErrorUnzipMem(226) - "Unable to allocate memory for one or more buffers during initialization."
pzeErrorUnzipAllocate(227) - "Unable to allocate memory or unable to obtain a tty to read the decryption password(s)."

pzeErrorUnzipMemDecom(228) - "Unable to allocate memory during decompression to disk."
pzeErrorMemMem(229) - "Unable to allocate memory during in-memory decompression."
pzeErrorZipNotFound(231) - "Specified zipfiles were not found."
pzeErrorInvalidOptions(232) - "Invalid options were specified."
pzeErrorNoMatch(233) - "No matching files were found."
pzeErrorDiskFull(234) - "The disk is (or was) full during extraction."
pzeErrorEndOfArchive(235) - "The end of the ZIP archive was encountered prematurely."
pzeErrorUnsupported(237) - "Testing or extraction of one or more files failed due to unsupported compression methods or unsupported decryption."

pzeErrorBadPassword(238) - "No files were found due to bad decryption password(s). (If even one file is successfully processed, however, the exit status is 1.)"

pzeErrorUnzipNoZip(239) - "ZIP file not specified or it does not exist"
pzeErrorNoExtractDir(240) - "Error while reading multi disk archive."
pzeErrorReadSpan(241) - "Memory allocation error while reading multi disk archive"
pzeErrorReadSpanMem(242) - "Unknown error while reading multi disk archive."
pzeErrorReadSpanUnknown(243) - "Unable to load PolarZipSpan.dll"
pzeErrorNoSpanDll(244) - "Error during removing Sfx Stub from Zip file."
pzeErrorRemoveSfxStub(245) - "Error during creating Sfx from Zip file."
pzeErrorCreateSfx(246) - "Error during Browsing for File."
pzeErrorBrowseForFile(247) - "At least two files are needed to create archive"
pzeErrorSpanNoFiles(248) - "Too many files specified to create archive from multi file archive (max. 999)"
pzeErrorSpanTooManyFiles(249) - "Could not create output file"
pzeErrorSpanCreatingOutput(250) - "Error reading input file."
pzeErrorSpanReading(251) - "Error writing to ouput file."

}


Frequently Asked Questions ...

General - About Payment and Conditions of Use Trial Version

Troubleshooting With Control Registering

How to...

General - About Payment and Conditions of Use Trial Version

Q: What are the limits of the trial version?

A: Trial versions of all our components are completely functional. The trial version will put the '.trial' extesion on the first file in the archive.. This means you can use all functionality in trial version as well as in release.

Q: Please specify how can I order your product?

A: You can order Polar products Online (Polar Zip Light Component can be ordered at http://www.polarsoftware.com), by E-mail (sales@polarsoftware.com) or via resellers (for the list of resellers see on http:/www.polarsoftware.com).

If you have more queries about the order, please feel free to contact our sales department at sales@polarsoftware.com.

Q: What types of payment do you accept?

A: You can pay using credit cards: Visa, MasterCard, American Express; by Wire Transfer and (Company) Check.

If you have more queries about the order, please feel free to contact our sales department at sales@polarsoftware.com.

Q: How do you deliver your products?

A: Polar Software products are now available only through ESD.

Q: If I buy the component now, will I be entitled to the coming versions at no extra cost?

A: Minor versions will be free for anyone who ordered last major version. Further major versions (5.0, 6.0...) will be available as upgrade (for the acceptable price).

Q: Are the License numbers or quantities of copies referring to developers or end users of the software that contains the Polar Zip Light Component?

A: The number of licenses refers to the number of developer's machines, while redistribution with your application is free. There are no royalty fees for any of our components. They are all royalty free, although one software license is required per developer's machine.

Troubleshooting With Control Registering

Q: If I try to install your demo file (PolarZIPLight.dll) without your install package the ActiveX file don't work. (If I install with: regsvr32 PolarZIPLight.dll) If I buy the original version is it possible to install it without your installation software?

A: Re-distribution of Polar Zip Light ActiveX control is explained in the ReadMe file (came with the installation).

Q: I downloaded the Polar Zip. Ran Setup. Copied PolarZIPLight.dll to winnt\system32. I have loaded all req. DLL's. Problem: Could not register the ActiveX control. Received "specified module could not be found".

A: There are few possible causes and solutions:

a) When you copied the control to WIN\SYS directory it is possible that you removed the control from directory where it was installed. It shouldn't be removed because Windows search for the control using registry entries which contain controls path, unlike DLLs which must be located in system directory. If you moved the control, you have to re-register it in new directory.

b) If you just made a new copy of PolarZIPLight.dll in WIN\SYS and registered it, It is possible that previous copy of Polar Zip Light OCX remained registered, so you have to unregister it. (Because setup procedure registered Polar Zip Light in its own directory, during the installation.)

Q: If I want to upgrade existing ActiveX control, what will happen after I download and install it? Is it going to overwrite existing files or it will exist as the new version.

A: When you install new version, you can choose different folder to install in, but new version will be registered and your system will recognize just this, registered one. So you can keep two different versions of control on your computer, but you must keep in mind that you must register control manually, each time you want to switch from one to another.

Q: I would like to incorporate your Zip in my program. I do not know

(a) What I would distribute to my potential users,

(b) How would I get InstallShield to register the OCX.

A: (a) You can read about redistribution of files in ReadMe.txt, but I will describe it here:

When re-distributing Polar Zip Light RELEASE, you can redistribute only PolarZIPLight.dll file.

If you didn't purchased license for Polar Zip Light, you are permitted to redistribute only a TRIAL version of Polar Zip Light.

And finally, in order for Polar Zip Light OCX to work properly on the customer's machine, he must have the following files:

  1. PolarZIPLight.dll

The .OCX file must be registered on each user's machine. To register an OCX on the user machine, use the REGSVR32.EXE utility. This utility is available from Microsoft. To run this utility type the following at the command prompt on each user's machine:

Regsvr32 filename

Our ActiveX controls require OLE2 support to be installed on a machine. In order to run an application containing one of our controls you must ensure OLE2 has been installed on the user's machine. If your client's machine has older versions of these files, you should update them.

(b) You can manually add function for the registration in the script file (setup.rul):

Note: This function will work if the REGSVR32.EXE is in windows/system directory!

/*-------------------------------------------------------------------

RegisterOCX

Registration of OCX

-------------------------------------------------------------------*/

function RegisterOCX()

STRING svOCXPath;

begin

// Registration of OCX

svOCXPath = svTargetDir ^ "PolarZIPLight.dll";

LongPathToShortPath( svOCXPath );

LaunchAppAndWait(WINSYSDIR^"regsvr32.exe", "/s " + svOCXPath, WAIT);

end;

How to...

Q: How can I zip files with Polar Zip Light? I tried Add method but nothing happened.

A: I suppose you didn't set all required properties. Polar Zip Light starts zipping when you call Add() method, but before that you must specify:

FilesToProcess | - define which files will be added to the archive (bmp, jpeg, exe, all...)
SourceDirectory | - location of files that are going to be added to the archive (full path of directory)
ZipFileName | - location of the archive (full path)

Example:

ZipLight1.FilesToProcess = "*.bmp | *.wmf"

ZipLight1.SourceDirectory = "C:\MyPictures"

ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"

ZipLight1.Add()

You can also set many other useful properties for example:

Password

- when you want to create password protected file

and many other.

Q: Which properties have to be set before unzipping?

A: Polar Zip Light starts unzipping when you call Extract() method, but before that you must specify:

FilesToProcess | - define which files will be extracted from the archive
ExtractDirectory | - location where the files will be extracted (full path of directory)
ZipFileName | - location of the archive (full path)

Example:

ZipLight1.FilesToProcess = "*.bmp"

ZipLight1.ExtractDirectory = "C:\Temp"

ZipLight1.ZipFileName = "C:\Polar\Zip\pictures.zip"

ZipLight1.Extract()

You can also set many other useful properties for example:

Overwrite

- defines whether files that already exist in the extract directory (with the same names) will be overwritten

and many other.

Q: Control returns an error 12 when performing the Add method. The "nothing to do" doesn't tell me what I'm doing wrong. Help!

A: "Nothing to do" means that Polar Zip Light didn't find any file of specified pattern (Look to the value of the FilesToProcess) in the SourceDirectory.

You can check FilesToProcess property, SourceDirectory property or RecurseSubDirectories property value. (Maybe subdirectories of your SourceDirectory contain the specified mask, just you didn't let zip know that it must look to the subdirectories).

Q: I have a trial copy of Polar Zip Light and I cannot create a zip file. Is this a problem with my program or is this a limitation of the trial version?

Here is the VB code I am using:

frmSendQuote.ZipLight1.SourceDirectory = sTempDir

frmSendQuote.ZipLight1.CompressionLevel = 6

frmSendQuote.ZipLight1.ZipFileName = "QUOTES.zip"

frmSendQuote.ZipLight1.FilesToProcess = " " & sFileList

frmSendQuote.ZipLight1.Add

A: Looking to a sample code that you've sent, I'm not sure how does sFileList look, but I suppose the main problem is parameter

frmSendQuote.ZipLight1.ZipFileName = "QUOTES.zip"

ZipFileName has to be the name of zip file including full path. You wrote only the filename and that fires OnError event with description "ZIP file path does not exist". Provide to Polar Zip Light control full zip path (and file name) and zip will be created in a moment.

Q: I am trying to get a list of all files in a zip file and write them to a string. I cannot find how to get the list of files in the zip though. I have looked at polZip_List but cannot see how to use it from the Polar Zip Light documentation.

A: To list the zip contents, follow these instructions:

  1. Call the Extract method. This method will 'read' the zip file, and at each file, FileInfo event will be triggered.

  2. You must catch this event and display or save needed information.

That's all.

Q: Do you support, or are you planning to support Windows CE platform?

A: Unfortunately, Polar Zip Light doesn't support Windows CE platform. We didn't plan it for the near future, unless we receive more suggestions like yours.

Q: Before extracting, I want to check for a virus. Is there any option or interface for existing virus scanner in my computer? My computer virus scanner might detect virus when I try to uncompress a file using Polar Zip Light, but this program I'm trying to write will be unattended. I don't know how to handle it if virus was detected. So, does Polar Zip Light have some kind of interface that returns a status or warning for viruses?

A: There are no options in Polar Zip Light for interfacing with virus checker. You can call virus checker after decompressing to check for viruses and if file is infected take appropriate actions (warning, delete..)

Q: Can you please pass along the file and archive size restrictions if any, when using the component. Currently we use another ZIP component in some of our software and have to deal with certain size restrictions. We are looking for a way to archive data, without having to deal with archive size restrictions.

A: Restrictions of the size and number of files contained in an archive exist and they are: 2GB, and 65000 files per archive. Those restrictions are made because the compatibility with PKZIP. Unfortunately, we must keep those restrictions to keep compatibility with other zipping tools.

The workaround would be to make multi-file archive, where each archive can be 2GB long. But be careful, because Polar Zip Light enables you to make multi-file archive on one disk (non-removable), and on multiply disks.

Your option would be to choose removable disks, because when you create multi-file archive on non removable disk, you won't be able to extract it until you merge those into one file, but that will be impossible if each file has max size.

Q: One of my zipped documents cannot be extracted from the file. I created a "New Text Document.txt" in the root of my zip path, opened and revised it, and have been unable to extract it from the file. Other zip utilities (WinZip) have been able to extract the file. All other files seem to extract very nicely and I'm at a lost to understand the problem.

A: I suppose that file is the only one containing space in the file name. That explains why it wasn't extracted while all other were.

You must be careful when defining FilesToProcess value. All masks that contain spaces must be in quotation marks to be understood as one mask.

Q: Could you let me know what form of error checking your zip component is using (Adler32 or CRC32)?

A: The answer you requested is that our Zip is using CRC32 for error checking.

Q: Can not extract or list archive with the following file extensions *. and *.arc.

A: Unfortunately, Polar Zip Light can deal only with zip archives that are compatible with pkzip format.

Q: Why does the function parameter strFileName in the event FileStartedCompressing return the path with a slash "/" like "c:/path1/path2/file.ext" and not with a backslash like "c:\path1\path2\file.ext"? If I get the pathname from the List method the returned filenames also contain the slash and not the backslash.

A: Filenames are with slashes "/" because internal zip code is using them that way (slashes "/" and backslashes "\" are both legal on windows).


How to store paths

The FilesToProcess property is used to specify the files that you want to be zipped up (you can only use the Add method once you have done this). You can specify these files with either absolute paths, relative paths or without any paths at all. However, please note that drives (eg. "C:") are never stored in the Zip file, no matter how you specified the file in the FilesToProcess property (with absolute paths, relative paths or without any paths at all).

The rule for specifying files using relative paths is that they are assumed to have paths that are relative to the application's current directory. You can, however, use the SourceDirectory property to specify what the path files will be relative to. Either way, only the relative part of a path is stored in the zip file. If no paths have been specified, the files will be searched for in the current directory, or in the directory you specified in the SourceDirectory property.

NOTE: No path information will be stored in the zip file if only the filenames have been specified.

The rule for specifying files using absolute paths is that the complete file path, excluding the drive or the device, will be stored in the zip file. Namely, if you specified "C:\FOLDER\*.*" or "\\DEVICE\OTHERNAME\DATA\*.*" in FilesToProcess, all the files will be stored in the zip file without the "C:\" or the "\\DEVICE\OTHERNAME\" parts.


Relative-Absolute Paths

Absolute paths:
"C:\temp\test.zip"
"\\Dexter\Documents\test.zip"

Relative paths:
"temp\test.zip"
"Documents\test.zip"