[Delphi (Object Pascal)] Delphi获取磁盘信息 →→→→→进入此内容的聊天室

来自 , 2020-10-15, 写在 Delphi (Object Pascal), 查看 122 次.
URL http://www.code666.cn/view/d2a1e34d
  1. function DiskSpaceInfo(const Drive: string; out AvailBytes, TotalBytes,
  2.   FreeBytes: Int64): Boolean;
  3. begin
  4.   // We use GetDiskFreeSpaceEx from SysUtils since it deals with OSs that do not
  5.   // support the Windows GetDiskFreeSpaceEx API call
  6.   Result := SysUtils.GetDiskFreeSpaceEx(
  7.     PChar(Drive), AvailBytes, TotalBytes, @FreeBytes
  8.   );
  9.   if not Result then
  10.   begin
  11.     AvailBytes := 0;
  12.     TotalBytes := 0;
  13.     FreeBytes := 0;
  14.   end;
  15. end;
  16. //delphi/2195

回复 "Delphi获取磁盘信息"

这儿你可以回复上面这条便签

captcha