格式化文件体积

·

两个函数

  1. StrFormatByteSize
  2. StrFormatByteSize64

StrFormatByteSize64 can be used for either ANSI or Unicode characters. However, while StrFormatByteSize64A can be called directly, StrFormatByteSize64W is not defined. When StrFormatByteSize64 is called with a Unicode value, StrFormatByteSizeW is used.

In Windows 10, size is reported in base 10 rather than base 2. For example, 1 KB is 1000 bytes rather than 1024.

The following table illustrates how this function converts a numeric value into a text string.

REMARKS
Numeric value Text string
532 532 bytes
1340 1.30 KB
23506 23.5 KB
2400016 2.40 MB
2400000000 2.4 GB

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注