| A. Files | B. Directories | C. Disks/Drives | D. File I/O | E. Stream I/O | F. Port I/O |
(
Bookmark)
| Topic | Description | Unit | ||
|
ASPI |
Advanced (Adaptec) SCSI Programming Interface. What is ASPI? Also see SCSI below Possibly useful for burning CDs directly? Examples? Non-Delphi: Sorting out the
ASPI driver mess |
|
||
| Boot Sector | Steve Schafer's UseNet Post
about "How do I change the boot record on a diskette?" with solutions for both
Win 95/98 and NT See Floppy.PAS unit in Alpha32.ZIP
donated by Dejan Maksimovic Boot
Partition for WinNT Non-Delphi: |
|||
| CD-R | List of CD-R Libraries www.stgsys.com/linksprog.html |
|||
| Open/Close CD-ROM drawer, PC Magazine, Neil Rubenking, Feb 4, 1997, www.zdnet.com/pcmag/pctech/content/solutions/oe1603a.htm Status of CD Rom Drawer Eject CD-ROM Under NT (using DeviceIOControl) Control the AutoPlay feature Getting the serial number of the CD ROM Does my CD-ROM Drive contain an Audio CD? Borland's FAQ 2756D Non-Delphi: Autorun.inf Commands |
||||
| Cluster Size | Clusterstorleken: GetClusterSize http://www.jpldata.net/~magnus/delphiqa/articles/0253.html FAT Type and Cluster Size Depends on Logical Drive Size Default Cluster Size for FAT and NTFS See FAT32 below |
|||
| CRC |
|
|||
![]() Delphi 4 introduced an Int64 data type and directly supports DiskFree and DiskSize functions for disks with capacity > 2 GB. Win 95 OSR2 or later, Win 98 or Win NT 4.0 or later, all support a GetDiskFreeSpaceEx API call for disks > 2 GB but Delphi 3 doesn't provide any direct support for this function. Delphi 4 introduced a trick by defining GetDiskFreeSpaceEx to be a variable, which in effect is a pointer to the real GetDiskFreeSpaceExA function, or a BackFillDiskFreeSpaceEx function that uses the older GetDiskFreeSpaceA API call when GetDiskFreeSpaceEx is not available. A DiskSpaceKludge.PAS unit provides the same basic functionality provided in Delphi 4 with Int64 variables by using the Comp data type in Delphi 3, which is also a 64-bit integer but is treated as a floating point variable. The unit initialization in DiskSpaceKludge, just like in Delphi 4's SysUtils.PAS unit, assigns a value to the GetDiskFreeSpaceEx variable. You can use the DiskSize and DiskFree functions in DiskSpaceKludge in Delphi 3 for disks > 2 GB (assuming you have the right operating system version) and then just get rid of it and use the native SysUtils.PAS in Delphi 4. DiskSpaceKludge also exposes the GetDiskFreeSpaceEx variable so the API call can be used directly. Complete Working Example: D3DiskSpaceKludge.ZIP |
||||
| Device Installer | Setup and Device Installer API interface. Project
JEDI Conversion Library. ftp://delphi-jedi.org/api/SetupAPI.zip |
|||
| DeviceIOControl | See VWin32.PAS unit in Alpha32.ZIP
donated by Dejan Maksimovic
Eject CD-ROM Under NT FAT32 unit including function GetFat32FreeSpace using DeviceIOControl Format a Disk with Delphi: Steve Schafer's UseNet Post Abner Doon's UseNet Post with IOCTL unit |
|||
| Disk Geometry | See TBIOSParamBlock and GetDeviceParamBlock in Steve Schafer's
UseNet
Post Xavier Pacheco's UseNet Post with DriveInfo |
|||
| DiskFree | D1-D3: function DiskFree(Drive: Byte): LongInt; D4-D5: Drive: 0=Current, 1=A, 2=B, ... |
SysUtils | ||
| DiskInDrive | How to check to see if a drive is ready, Borland's TI 921D
DiskInDrive is used in efg's ShowDrives example |
|||
| DiskInfo | Xavier Pacheco's UseNet Post with DriveInfo | |||
| DiskSize | D1-D3: function DiskSize(Drive: Byte): LongInt; D4-D5: Drive: 0=Current, 1=A, 2=B, ... |
SysUtils | ||
| Disk Utilities | Equalise - make files on a floppy or network drive match FindDuplicates - find and remove those multiple DLLs and other files ShowMan - disk space usage pie-chart WinTidy - locate and remove those temporary files you never knew you had |
|||
| DriveComboBox | Peter Below's UseNet
Post about how to avoid Error 21 while using DriveComboBox.
Patric Allen's UseNet Post about how to avoid Error 21 TIEDriveComboBox is a combobox for drives with icons taken from the system imagelist and variable volume label style. Part of Filemanager Toolset. http://delphi.icm.edu.pl/ftp/d40free/drivedir.zip |
|||
| DriveType | Todd M. Eischeid's DriveType function and DriveTypeToString | |||
| Drive Info | TDriveInfo is a non-visible class for the centralized drive
management. It provides informations about the currently installed logical drives.
Part of Filemanager Toolset. http://delphi.icm.edu.pl/ftp/d40free/drivedir.zip
Also see ShowDrives |
|||
| Drive View | TDriveView displays the directory structure of all drives as treeview with shell icons taken from the system imagelist. It supports file operations like creating, copying, renaming and deleting directories, full OLE-drag & drop for files and directories using dragimages, clipboard operations, detecting filesystem changes, displaying the system contextmenu and the system property sheets. Part of Filemanager Toolset. http://delphi.icm.edu.pl/ftp/d40free/drivedir.zip | |||
| Drives | "Directories and Drives," Delphi 5 Developer's Guide (pp. 380-403) by Teixeria and Pacheco | |||
| Eject |
Eject CD-ROM Under NT (using DeviceIOControl) Ejecting a ZIP disk (Un exemple fourni par J.M.
Pierrard : EJECTER une disquette ZIP ou un CD. Cette nouvelle version
fonctionne aussi en NT.) How can I eject a CD-ROM in code? Borland's FAQ 2740D |
|||
| ExtractFileDrive | function ExtractFileDrive(const FileName:
string): string; Extracts the drive part of the given filename. For filenames with drive letters, the resulting string is '<drive>:'. For filenames with a UNC path, the resulting string is in the form '\\<servername>\<sharename>'. |
SysUtils | ||
| FAT | File allocation table See Floppy.PAS unit in Alpha32.ZIP donated by Dejan Maksimovic |
|||
| see Cluster Size
FAT32 unit including functions GetFat32FreeSpace, IsFat32Available,
FreeSpaceOnDrive, TotalSpaceOnDrive Angus Johnson's UseNet Post about FAT and cluster size and D1 GetClusterSizeFAT32 function:
Non-Delphi: FAT32 File System FAT 32 API |
||||
| FDISK | Non-Delphi: How to Use Fdisk and Format to Partition or Repartition a Hard Disk http://support.microsoft.com/support/kb/articles/q255/8/67.asp |
|||
| Files | To get a list or process all files on a drive,
see the "recursive" solutions under FindFirst/FindNext/FindClose
on Directories page.
The FileListLibrary.PAS unit provides a ScanDirectory procedure for a generic way to process a hierarchy of directories and files. Two callback routines are parameters to ScanDirectory to process each file, and to process the beginning and end of a directory. The routines ProcessDirectory and ProcessFile in ScreenFileCheck.PAS are the routines used as parameters to ScanDirectory. See the FileCheck Lab Report for the source code. |
|||
| Floppy | See Floppy.PAS unit in Alpha32.ZIP
donated by Dejan Maksimovic
Functions: AllocFloppyFSBR, ReadFloppyFSBR, FreeFloppyFSBR,
CreateFloppyBootRecord, CreateFloppyFATs, CreateFloppyRootDir,
FormatFloppyDisk
UseNet Post by Paul Jackson with FloppyDriveHasDisk example |
|||
| "Formatting Disks" in From the
Shell: Part I: Dialog Boxes Youve Always Needed, Delphi Informant,
April 1999 Peter Below's UseNet Post about
using Quick Format Comment FORMATER UNE DISQUETTE en utilisant l'API SHFormatDrive. Formatting a drive under Win32, Borland FAQ 1307D Jon Scott's Format Floppy example See Floppy.PAS unit in Alpha32.ZIP donated by Dejan Maksimovic ANTS TFloppyFormat component allows the floppy disks formatting and/or verification, disk checking, bootable disks making, single tracks formatting, reading/writing the floppy disk sectors in Windows 95, 98 and NT. Extensive help file and demonstration program are included. http://delphi.icm.edu.pl/ftp/d20share/fformdem.zip |
||||
FreeClusters and TotalClusters returned by GetDiskFreeSpace
will be at most 65526 and the free space can never exceed
2,147,155,968 bytes. This is a limitation of the Win32 API. See GetDiskFreeSpaceEx.
|
System | |||
| GetDiskFreeSpaceEx (D4) |
This Win32 function only exists on Win NT 4.0 and Win 95 OSR2 and Win 98. GetDiskFreeSpaceEx is actually a variable in SysUtils that is set at startup to point to either the actual OS API function, if it exists, or an internal Delphi function if it does not. While running on Win 95 pre-OSR2 the result is still limited to 2 GB, but you don't have to worry about which API function to code.
|
SysUtils | ||
| How to tell what kind of drive is used, Borland's TI 980D
Trouver le TYPE D'UN DRIVE (si c'est un disque dur, un lecteur de
disquette etc.). efg's ShowDrives example |
||||
| GetFat32FreeSpace | FAT32 unit including function GetFat32FreeSpace using DeviceIOControl Dr. Abimbola A. Olowofoyeku's (African Chief) UseNet Post |
|||
| GetLogicalDrives |
Neil Rubenking's GetLocalDrives in the AllFuncs.pas unit of his ColorClue utility. efg's ShowDrives example |
Windows | ||
|
Neil Rubenking's GetVolumeSerial in the AllFuncs.pas unit of his ColorClue utility. efg's ShowDrives example FileSystemFlags returned by GetVolumeInformation include: GetVolumeInformation See IsDriveCompressed example below. |
||||
| IDE | see book entry under SCSI below | |||
| IOCTL | Abner Doon's UseNet Post with IOCTL unit | |||
| IsCDRom | Detecting a CD-ROM Drive www.undu.com/dn960223/00000011.htm |
|||
| IsDiskWriteProtected | See efg's ShowDrives example | |||
| IsDriveCompressed |
|
|||
| IsSubst | Neil Rubenking's IsSubst in the AllFuncs.pas unit of his ColorClue utility. Is a Subst drive. | |||
| Managing Disks | Delphi in a Nutshell, p. 500 | |||
| Mapping | Alberto Spelta's UseNet Post About How Show The Network Drive Map Dialog. | |||
| Network Drives | How do I map a network drive in Windows NT or '95?, Borland's TI 1592D
GetNetworkDriveMappings using WNetGetConnection Nework Share, Delphi Informant, Aug. 1999. From the Shell: Dialog Boxes You've Always Needed, Delphi Informant, May 1999, Vol. 5, No. 5, pp. 28-36 Function to list all the network drive mappings |
|||
| Out of Space | From the Shell: Dialog Boxes You've Always Needed, Delphi Informant, May 1999, Vol. 5, No. 5, pp. 28-36 | |||
| Ready | See DiskInDrive | |||
| SCSI | ftp://delphi-jedi.org/api/scsi.zip http://www.delphi-jedi.org/Jedi:APILIBRARY |
|||
| Steve Schafer's (Team B) 8 Oct 99 UseNet Post about "Serial Number
on Disk": "A hard disk has two serial numbers. One is the hardware serial number (which is sometimes displayed by the BIOS during the boot-up process). The hardware serial number never changes. The other is the volume serial number (the one that is displayed when you issue a DIR command at the DOS prompt). The volume serial number changes whenever you format the disk." Mike's UseNet Post with two methods to get Volume Label Peter Below's (Team B) UseNet Post about
changing drive's serial number (16-bit code) Getting and setting a disks (sic) serial number, Borland's TI 475D Getting the serial number of the CD ROM |
||||
| ShChangeNotify | Shell Notifications: Getting Windows to Share Some of Its Secrets, Delphi Informant, April 1999. Peter Below's UseNet Post: If present the drive can signal to the drive controller that a media change occurred, the controller informs the driver and the driver sends a WM_DEVICECHANGE message around to inform any interested parties of the change. Cheaper drives often don't have the hardware. Uses ShlObj; |
|||
| SHFormatDrive | See "Format Disk Drive" (above) | |||
| ShowDriveType | How to tell what kind of drive is used, Borland's TI 980D | |||
| Procedure to display drives in TMemo
with fixed-width "Terminal" font.. Uses GetLogicalDrives
procedure to indentify existing drives and GetVolumeInformation,
DiskFree and DiskSize to
display drive information. Limited to 2 GB in D3 but there is no limit in
D4 or later. ShowDrives.TXT Sample Output: Drive R/W Total Bytes Free Bytes Vol Ser Label --------- --- ---------------- ---------------- -------- ------------- A Floppy R/O 1,457,664 1,444,864 B4024F70 DRIVERS C Fixed R/W 10,230,431,744 7,687,897,088 15FD3658 C D Fixed R/W 3,222,343,680 508,985,344 3B590FD8 D E CDROM R/W 686,587,904 651,788,288 06842D93 Oct2000 F CDROM R/O 530,153,472 0 73CF38F6 JoCo J Network R/O 12,057,051,136 2,213,543,936 00000000 EFG S Network R/W 5,242,748,928 858,783,744 00000000 Server Z Network <disk missing> List of valid drives (Lister la liste DRIVES VALIDES) |
||||
| subst | Howard Moon's UseNet Post describing a "DOS" way to assign a drive letter to a directory | |||
| SWAG | Drive SWAG (Software Archive Group). 124 various disk/drive
examples www.gdsoft.com/swag/drives.zip (requires Reader) |
|||
| TDriveType | efg's ShowDrives example | FileCtrl | ||
| TDVDrivesCombo | TDVDrivesCombo & TDVDrivesList Two Delphi components displays drives combo box or list box with associated icons. http://delphi.icm.edu.pl/ftp/d20free/dvdrives.zip | |||
| efg's FileCheck Lab Report
|
DBT_H | |||
| WNetGetConnection | See Network Drives | |||
| Zip Disk | Ejecting a ZIP disk (Un exemple fourni par J.M.
Pierrard : EJECTER une disquette ZIP ou un CD. Cette nouvelle version
fonctionne aussi en NT.) http://perso.wanadoo.fr/bardou/michel/zip/zipejecter.zip |
|||
Updated
27 Aug 2005
since
19 Apr 1999