function GetFileSize(const fName: AnsiString): Int64;
var
  hFile: THandle;
begin
  hFile := _lopen(PAnsiChar(fName), OF_READ);
  Result := FileSeek(hFile, Int64(0), 2);
  _lclose(hFile);
end;

 

此函数可以快速获取文件大小,即使文件已经被其它程序锁定。

相关文章:

  • 2022-12-23
  • 2021-12-08
  • 2021-08-12
  • 2021-09-22
  • 2021-10-08
  • 2022-02-10
  • 2021-12-12
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案