Unit DiscUtil

Classes

Functions

DiscErrorMessage - --- Error handling -----------------------------------------------------------
FloppyDriveSize - --- floppy disc size determination
FormatVolumeSerialNumber -
GetDiscFreeSpace - --- Available drive information
GetDriveShellInfo -
GetDriveType -
GetLogicalDriveList - --- Information on available drives ------------------------------------------
GetNetworkVolumeName -
GetVolumeInformation - --- Volume Information
GetVolumeName -
Retry -
SysErrorMessage -
SysErrorMessageParams - --- Error handling

Types

TDiscFreeSpace
TDriveShellInfo
TDriveType
TVolumeInformation

Constants

DriveNames

Variables

LargeImages
SmallImages


Functions


function DiscErrorMessage (Drive : Char) : string;

--- Error handling -----------------------------------------------------------

function FloppyDriveSize (Drive : char) : TDriveType;

--- floppy disc size determination

function FormatVolumeSerialNumber (N : integer) : string;


function GetDiscFreeSpace (Drive : char; var D : TDiscFreeSpace) : boolean;

--- Available drive information

procedure GetDriveShellInfo (Drive : Char; var Info : TDriveShellInfo);


function GetDriveType (Drive : Char) : TDriveType;


procedure GetLogicalDriveList (List : TStrings);

--- Information on available drives ------------------------------------------

function GetNetworkVolumeName (D : char): string;


function GetVolumeInformation (D : char; var V : TVolumeInformation) : boolean;

--- Volume Information

function GetVolumeName (D : char) : string;


function Retry (Drive : Char) : boolean;


function SysErrorMessage (ErrorCode: Integer): string;


function SysErrorMessageParams (ErrorCode: Integer; const Params : array of string): string;

--- Error handling

Types


TDiscFreeSpace = record
SectorsPerCluster : integer
BytesPerSector : integer
NumberOfFreeClusters : integer
TotalNumberOfClusters : integer
TotalSpace : integer
FreeSpace : integer
end;

TDriveShellInfo = record
Icon : hIcon;
Image : integer;
DisplayName : string
TypeName : string
end;

TDriveType = (dtUnknown, dtNoDrive, dtFloppy, dtFixed, dtNetwork, dtCDROM,
                dtRAM, dtFloppy3, dtFloppy5);
--- Types of disc drive ------------------------------------------------------
TVolumeInformation = record
VolumeName : string;
VolumeSerialNumber : integer;
MaximumComponentLength : integer;
FileSystemFlags : integer;
FileSystemName : string;
end;
--- Disc volume information --------------------------------------------------

Constants

DriveNames = ('Unknown', 'None', 'Floppy', 'Fixed', 'Network', 'CD-ROM', 'RAM', '3½ Floppy', '5¼ Floppy')


Variables

LargeImages : TImageList

SmallImages : TImageList

--- System image lists -------------------------------------------------------