Opens an existing archive in RAR format.
MyArchive is zipArchive
// Open an archive
ResOpenArchive = zipOpenRAR(MyArchive, "C:\MyArchives\Archive.rar")
// Display an error message if the archive was not opened
IF ResOpenArchive <> 0 THEN
Error(zipMsgError(ResOpenArchive))
END
Syntax
<Result> = zipOpenRAR(<Archive> , <Archive path> [, <Archive opening mode>])
<Result>: Integer
- 0 if the archive was opened,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive>: Character string or zipArchive variable
Name of the archive to be used.
This name can correspond to:
<Archive path>: Character string
Path and name of archive (up to 260 characters). The archive extension can be specified.
<Archive opening mode>: Optional constant (or combination of constants)
Options for opening the archive: | |
zipHeader64 | Allows you to create an archive larger than 4 GB on which zipChangePath can be used. |
zipRead | Opening in read-only. |
Remarks
Error codes
The following error codes are returned:
- 1: The path passed as parameter does not exist.
- 2: Access denied: the user has no sufficient rights.
- 3: The archive is corrupted.
- 6: The files of the sub-archives are not arranged in order (when opening a multi-part archive).
The message corresponding to the error code is returned by
zipMsgError.
Business / UI classification: Business Logic