A ati82 Unregistered / Unconfirmed GUEST, unregistred user! 2008-02-12 #1 怎么获取操作系统磁盘管理中显示的硬盘总容量以及设备管理器的磁盘驱动器中的磁盘名称
D deardragon_2002 Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-28 #3 var S: string; AmtFree: Int64; Total: Int64; begin AmtFree := DiskFree(0); Total := DiskSize(0); S := IntToStr(AmtFree div Total) + 'percent of the space on drive 0 is free: ' (AmtFree div 1024) + ' Kbytes free. '; Canvas.TextOut(10, 10, S); end;
var S: string; AmtFree: Int64; Total: Int64; begin AmtFree := DiskFree(0); Total := DiskSize(0); S := IntToStr(AmtFree div Total) + 'percent of the space on drive 0 is free: ' (AmtFree div 1024) + ' Kbytes free. '; Canvas.TextOut(10, 10, S); end;
D deardragon_2002 Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-28 #4 function DiskSize(Drive: Byte): Int64; Description DiskSize returns the size in bytes of the specified drive, where 0 = Current, 1 = A, 2 = B, etc. DiskSize returns -1 if the drive number is invalid.
function DiskSize(Drive: Byte): Int64; Description DiskSize returns the size in bytes of the specified drive, where 0 = Current, 1 = A, 2 = B, etc. DiskSize returns -1 if the drive number is invalid.
D deardragon_2002 Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-28 #5 取名称用GetVolumeInformation函数