Forms Delphi

Title: read all volume information
Question: How can I read all volume information?
Answer:
We can use the API and local Delphi functions to make that.
Read this the example on my machine.
***************************************************************
Procedure Get_allVolumeInformation;
var
DriveNa: String; // Temp buffer for drive name.
SectorPerCluster: Cardinal;
BytesberSecture : Cardinal;
NumberofFreeCluster: Cardinal;
TotalNumberOfCluster: Cardinal;
VolumeSerialNumber : DWORD;
MaximumComponentLength : DWORD;
FileSystemFlags : DWORD;
Buffer: Array [0..255] of Char;
FSNAME: Array [0..255] of Char;
SerialNumber : string;
begin
DriveNa := Drive.Drive + ':\';
SetCurrentDir(DriveNa);
{** Read Vol SN, Label and file systme **}
GetVolumeInformation(PChar(DriveNA),
Buffer,
Sizeof(Buffer),
@VolumeSerialNumber,
MaximumComponentLength,
FileSystemFlags,
FSNAME,
Sizeof(FSNAME));
SerialNumber := IntToHex(HiWord(VolumeSerialNumber), 4) +
'-' +
IntToHex(LoWord(VolumeSerialNumber), 4);
{************* Send the result to Edit Box ***************}
E_SerialNumber.Text := SerialNumber;
E_DriveLable.Text := String(Buffer);
E_FileSys.Text := String(FSNAME);
{** Read Sector Per Cluster, Bytes per Secture,
Number of Free Cluster, Total Number Of Cluster **}
Windows.GetDiskFreeSpace(PChar(DriveNa), SectorPerCluster, BytesberSecture,
NumberofFreeCluster, TotalNumberOfCluster);
{************* Send the results to Edit Box ***************}
Sector_Per_Cluster.Text := InttoStr(SectorPerCluster);
Bytes_Per_Sector.Text := IntToStr(BytesberSecture);
Number_of_free_Clusters.Text := InttoStr(NumberofFreeCluster);
Total_Number_of_Clusters.Text := IntToStr(TotalNumberOfCluster);
E_DiskSize.Text := FloatToStr(DiskSize(0)/1048576); // Calc by MB.
E_FreeSize.Text := FloatToStr(DiskFree(0)/1048576); // calc by MB.
end;