TJETUnRAR
v1.0
Shareware by John Tisch
![]()
Purpose:
This Delphi component is intended to allow you to extract files from archives created using the RAR compression format. Some of the features it includes are:
Features limited in shareware version:
Fee to upgrade to full
version removing shareware limitations: $10
Contact: John Tisch
WWW: http://home.earthlink.net/~jetisch/
Requirements:
Installation:
Properties:
Name |
Access |
Type | Default |
Usage |
| CurrentData | Runtime | PChar | nil | Contains a pointer to a memory block which holds the currently active data being either extracted or tested. **Should only be used during the ProcessData event callback |
| CurrentDataSize | Runtime | Integer | 0 | Contains the size of the memory block held in the CurrentData PChar property |
| CurrentFile | Runtime | String | '' | Contains the name of the file currently being extracted or tested |
| CurrentVolume | Runtime | String | '' | Contains the current volume name of the archive set being extraced or tested |
| DisplayGrid | Design & Runtime | TStringGrid | nil | Used as a way to display the files in an archive automatically whenever the RetrieveHeaders method is called |
| ShowCommentsDlg | Design
& Runtime |
Boolean | True | Defines whether or not to display the archive comments |
| ShowProgressDlg | Design
& Runtime |
Boolean | True | Defines whether or not to display a progress dialog when extracting |
| Version | Design | String | N/A | Used for version information |
Methods:
| Name: | function ExtractAllFiles(ArchiveFile, ExtractPath: String): Integer | |
| Parameters: | ArchiveFile: String | The full path and filename of the archive to open for extraction |
| ExtractPath: String | The full path of where to extract files to | |
| Returns: | ERAR_END_ARCHIVE
= 10; ERAR_NO_MEMORY = 11; ERAR_BAD_DATA = 12; ERAR_BAD_ARCHIVE = 13; ERAR_UNKNOWN_FORMAT = 14; ERAR_EOPEN = 15; ERAR_ECREATE = 16; ERAR_ECLOSE = 17; ERAR_EREAD = 18; ERAR_EWRITE = 19; ERAR_SMALL_BUF = 20; ERAR_WRONG_MODE = 21; |
If extraction
is successfull an ERAR_END_ARCHIVE is returned. Failure would be any other result |
| Name: | function ExtractSelectedFiles(SelectedFiles: TStringList; ArchiveFile, ExtractPath: String): Integer | |
| Parameters: | SelectedFiles: TStringList | A StringList composed of filenames to extract from the archive passed in parameter ArchFile |
| ArchiveFile: String | The full path and filename of the archive to open for extraction | |
| ExtractPath: String | The full path of where to extract files to | |
| Returns: | ERAR_END_ARCHIVE
= 10; ERAR_NO_MEMORY = 11; ERAR_BAD_DATA = 12; ERAR_BAD_ARCHIVE = 13; ERAR_UNKNOWN_FORMAT = 14; ERAR_EOPEN = 15; ERAR_ECREATE = 16; ERAR_ECLOSE = 17; ERAR_EREAD = 18; ERAR_EWRITE = 19; ERAR_SMALL_BUF = 20; ERAR_WRONG_MODE = 21; |
If extraction is successfull an ERAR_END_ARCHIVE is returned. Failure would be any other result |
| Name: | function TestAllFiles(ArchiveFile: String): Integer | |
| Parameters: | ArchiveFile: String | The full path and filename of the archive to open for testing |
| Returns: | ERAR_END_ARCHIVE
= 10; ERAR_NO_MEMORY = 11; ERAR_BAD_DATA = 12; ERAR_BAD_ARCHIVE = 13; ERAR_UNKNOWN_FORMAT = 14; ERAR_EOPEN = 15; ERAR_ECREATE = 16; ERAR_ECLOSE = 17; ERAR_EREAD = 18; ERAR_EWRITE = 19; ERAR_SMALL_BUF = 20; ERAR_WRONG_MODE = 21; |
If test is successfull an ERAR_END_ARCHIVE is returned. Failure would be any other result |
| Name: | function IsValidArchive(ArchiveFile: String): Boolean | |
| Parameters: | ArchiveFile: String | The full path and filename of the archive to open for extraction |
| Returns: | True | If the ArchiveFile is of type ACE |
| False | If the ArchiveFile is NOT of type ACE | |
| Name: | function RetrieveHeaderList(ArchiveFile: String; AllHeaders: Boolean): TStringList | |
| Parameters: | ArchiveFile: String | The full path and filename of the archive to open for extraction |
| AllHeaders: Boolean | Retrieve headers for the entire archive set (True) or just the current archive (False) | |
| Returns: | TStringList | Check the returned TStringList.Count to determine if the archive was valid. Valid being greater than 0 |
Events:
| Name | Usage |
| AfterExtract: TNotifyEvent | Executed after an extraction has completed |
| AfterTest: TNotifyEvent | Executed after a test has completed |
| BeforeExtract: TNotifyEvent | Executed before an extraction takes place |
| BeforeTest: TNotifyEvent | Executed before a test takes place |
| DuringExtract: TNotifyEvent | Executed during the extraction process |
| DuringTest: TNotifyEvent | Executed during the test process |
| OnChangeVolume: TNotifyEvent | Executed when a change of volume is taking place |
| OnProcessData: TNotifyEvent | Executed when data is being processed |
Example Program:
Notes:
Any comments may be directed to: jetisch@earthlink.net
Code Example:
Assuming you have added a new TJETUnRAR component to a form...
| Example of
extracting all files in an archive set to a directory: JETUnRAR1.ExtractAllFiles('C:\RARFILE.RAR', 'C:\EXTRACT'); Example of testing all files in an archive set: Example of extracting a list
of files from an archive to a directory: Example of checking if a file
is a valid archive: |
Download TJETUnRAR
v1.0 for Delphi 4.x Now!
Download TJETUnRAR v1.0 for Delphi 3.x Now!
![]()