ComHelper.OpenZip

OpenZip(Stream)

Allows a COM application to load a ZIP archive from a stream.

public Archive OpenZip(Stream stream)
ParameterTypeDescription
streamStreamA .NET stream object that contains the archive to load.

Return Value

A Archive object that represents the archive.

Exceptions

exceptioncondition
EndOfStreamExceptionThrown when the end of the stream is reached before the expected number of bytes are read.

See Also


OpenZip(string)

Allows a COM application to load a ZIP archive from a file.

public Archive OpenZip(string fileName)
ParameterTypeDescription
fileNameStringFilename of the archive to load.

Return Value

A Archive object that represents the archive.

Exceptions

exceptioncondition
EndOfStreamExceptionThrown when the end of the stream is reached before the expected number of bytes are read.
ArgumentExceptionThe file name is empty, contains only white spaces, or contains invalid characters.
ArgumentNullExceptionfileName is null.
DirectoryNotFoundExceptionThe specified path is invalid, such as being on an unmapped drive.
FileNotFoundExceptionThe file is not found.
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length.
UnauthorizedAccessExceptionAccess to fileName is denied.

See Also