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 ZipMan class.

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

 

 

Syntax

 

[Visual Basic]

Public Function Create (

strZipFilePathname as String,

nEncryptionType as enumZipEncryptionTypes,

strPassword as String,

bool bReplaceExisting

) as enumErrorCodes


 

[C#]

public enumErrorCodes Create (

string strZipFilePathname,

enumZipEncryptionTypes nEncryptionType,

string strPassword,

bool bReplaceExisting

);


 

[C++]

public: enumErrorCodes Create (

string strZipFilePathname,

enumZipEncryptionTypes nEncryptionType,

string strPassword,

bool 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:

Value

Meaning

false

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

true

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 see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.