Please enable JavaScript to view this site.

KOL/MCK - User Guide

TCABFile = object( TObj )

An object to simplify extracting files from a cabinet (.CAB) files. The only what need to use this object, setupapi.dll. It is provided with all latest versions of Windows.

 

type PCABFile = ^TCABFile;

 

 

TCABFile Properties

 

property Paths[ Idx: Integer ]: KOLString;

A list of CAB-files. It is stored, when constructing function OpenCABFile called.

 

property Names[ Idx: Integer ]: KOLString;

A list of file names, stored in a sequence of CAB files. To get know, how many files are there, check Count property.

 

property Count: Integer;

Number of files stored in a sequence of CAB files.

 

property CurCAB: Integer;

Index of current CAB file in a sequence of CAB files. When OnNextCAB event is called (if any), CurCAB property is already set to the index of path, what should be provided.

 

 

TCABFile Methods

 

destructor Destroy; virtual;

 

function Execute: Boolean;

Call this method to extract or enumerate files in CAB. For every file, found during executing, event OnFile is called (if assigned).

If the event handler (if any) does not provide full target path fora file to extract to, property TargetPath is applyed (also if it is assigned), or file is extracted to the default directory (usually the same directory there CAB file is located, or current directory - by a decision of the system).

If a sequence of CAB files is used, and not all names for CAB files are provided (absent or represented by a AnsiString '?' ), an event OnNextCAB is called to obtain the name of the next CAB file.

 

function OpenCABFile( const APaths: array of AnsiString ): PCABFile;

This function creates TCABFile object, passing a sequence of CAB file names (fully qualified). It is possible not to provide all names here, or pass '?' AnsiString in place of some of those. For such files, either an event OnNextCAB will be called, or (and) user will be prompted to browse file during executing (i.e. Extracting).

 

 

TCABFile Events

 

property OnNextCAB: TOnNextCAB;

This event is called, when a series of CAB files is needed and not all CAB file names are provided (absent or represented by '?' AnsiString).

If this event is not assigned, the user is prompted to browse file.

 

property OnFile: TOnCABFile;

This event is called for every file found during Execute method.

In an event handler (if any assigned), it is possible to return False to skip file, or to provide another full target path for file to extract it to, then default. If the event is not assigned, all files are extracted either to default directory, or to the directory TargetPath, if it is provided.

 

property TargetPath: KOLString;

Optional target directory to place there extracted files.

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC