ComHelper.OpenRar

OpenRar(Stream)

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

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

Return Value

A RarArchive object that represents the archive.

Exceptions

exceptioncondition
InvalidDataExceptionThrown when the data is invalid or corrupted.

See Also


OpenRar(string)

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

public RarArchive OpenRar(string fileName)
ParameterTypeDescription
fileNameStringFilename of the archive to load.

Return Value

A RarArchive object that represents the archive.

Exceptions

exceptioncondition
ArgumentExceptionThe file name is empty, contains only white spaces, or contains invalid characters.
ArgumentNullExceptionfileName is null.
ExceptionThrown when a runtime error occurs.
DirectoryNotFoundExceptionThe specified path is invalid, such as being on an unmapped drive.
FileNotFoundExceptionThe file is not found.
InvalidDataExceptionThrown when the data is invalid or corrupted.
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length.
UnauthorizedAccessExceptionAccess to fileName is denied.

See Also