Copyright © 2006-2019 MultiMedia Soft

ZIP.EntryAddFromMemory method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a new entry from a memory buffer to the ZIP file session previously opened through the ZIP.Open method or created through the ZIP.Create method.

 

This method only updates the ZIP session: to update or rewrite the ZIP file the ZIP.Save method would need to be called.

 

During the compression phase the container application is notified through the CallbackZipOperationPerc delegate which reports the current percentage of advancement.

 

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 EntryAddFromMemory (

strEntryName as String,

pBuffer() as Byte,

nBufferLength as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes EntryAddFromMemory (

string strEntryName,

byte[] pBuffer,

Int32 nBufferLength

);


 

[C++]

public: enumErrorCodes EntryAddFromMemory (

string strEntryName,

unsigned char __gc[] pBuffer,

Int32 nBufferLength

);


 

 

Parameter

Description

 

 

strEntryName

String representing the name assigned to the entry when added to the ZIP file. Can be also a relative path.

pBuffer

Memory buffer containing data of the new entry

nBufferLength

Length of the memory buffer expressed in bytes

 

 

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.