Opens an existing zip file.

 Syntax

ZipHandle = SRP_Zip_Open(File)

Returns

A handle to the opened zip file or 0 if there was an error.

Parameters

File The name and path of the zip file to open.

Remarks

Call this routine to open an existing zip file. If the zip file does not exist, then a new one is created for you. Use the returned handle in subsequent SRP Zip Utility calls.

You must call SRP_Zip_Close when you finished with an opened zip file.

The common extension for zip files is .zip. However, you may use any extension you wish. This can be useful for distinguishing between zip files used for updates, imports, exports, etc.

Example

// Open an existing zip file, and check for errors
hZip = SRP_Zip_Open("C:\MyFile.zip")
If hZip EQ 0 then
   Call Msg(@Window, SRP_Zip_GetLastError())
end else
   // add, extract, or remove files here
end
  • No labels