Unit DiskCaps

This simple component encapsulates two API functions: GetVolumeInformation and GetDriveType It allows to check: Drive Volume Label Drive Serial Number Drive file system type Length of directory component (unfortunatelly this function returns 255 chars almost always :( even in case of MSDOS 8+3) and Drive System Flags (which you have to test by you self - in this version) you can also change Drive Volume Label ChangeDiskLabel(NewLabel:string); and... If you enable CheckSNChange property - every time Serial Number of removable media changes OnSNChange fires. It is similar to Autorun function in system. Brief description of properities: property DiskLabel: Volume Label of disk pointed by Drive property. property DiskSerial: Serial Number of disk. (In Hexadecimal format) property ComponentLen: Length of directory component length. property FileSystem: File System of drive NTFS, HPFS... property DriveType: 0 The drive type cannot be determined. 1 The root directory does not exist. 2 The drive can be removed from the drive. 3 The disk cannot be removed from the drive. 4 The drive is a remote (network) drive. 5 The drive is a CD-ROM drive. 6 The drive is a RAM disk. property Drive: Drive letter property CheckSNChange: Enables checking Drive Serial Number state of selected drive. property OnDriveChanged: This event is fired every time you change Drive letter allowing update of connected components property OnSNChanged: This event is fired every time Serial Number changes It happen also when CD ROM is ejected (serial no. becomes 0) procedure ExamineDrive: This procedure updates state of component. Important: Changing Drive property disables CheckSNChange. This component is freeware. I guarantee you nothing concering this code, but you can use it as you wish. Happy coding Radoslaw Przybyl PRO-media CD Poland promedia@lodz.pdi.net Any comments will be welcome.

Classes

TDiskCaps -

Functions

Register -

Types

Constants

Variables


Functions


procedure Register;


Types


Constants


Variables