Copyright © 2008-2019 MultiMedia Soft

ZIP.Create method

Previous pageReturn to chapter overviewNext page

Remarks

 

Creates a brand new ZIP file session.

 

For further details about methods for ZIP management refer to the ZIP object.

For details about using ZIP management refer to the How to manage ZIP files tutorial.

 

 

Syntax

 

[Visual Basic]

control.ZIP.Create (

strZipFilePathname as String,

nEncryptionType as enumZipEncryptionTypes,

strPassword as String,

bReplaceExisting as enumBoolean

) as enumErrorCodes


 

[C++]

short control.ZIP.Create (

LPCTSTR strZipFilePathname,

short nEncryptionType,

LPCTSTR strPassword,

short bReplaceExisting

);


 

 

Parameter

Description

 

 

strZipFilePathname

String representing the absolute pathname of the ZIP file to open.

nEncryptionType

The type of protection/encryption to apply.

Supported values are the following:

Mnemonic constant

Numeric value

Meaning

ZIP_ENCRYPT_NONE

0

No encryption is applied.

The strPassword parameter below is ignored when this option is chosen.

ZIP_ENCRYPT_PWD_20

1

ZIP 2.0 compatible (weak/portable)

ZIP_ENCRYPT_AES_128

2

128 bits AES encryption (strong)

ZIP_ENCRYPT_AES_192

3

192 bits AES encryption (strong)

ZIP_ENCRYPT_AES_256

4

256 bits AES encryption (stronger)

strPassword

String containing the optional password to set for future files extraction or adding operations; leave it empty if not needed.

bReplaceExisting

Boolean value that specifies if an eventual ZIP file having the same pathname should be replaced or simply opened.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't replace an eventual existing ZIP file, in which case the method call would have the same effect as the ZIP.Open method

BOOL_TRUE

1

Replaces an eventual existing ZIP file with a new empty one

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful