Function Reference


_WinAPI_StrFormatByteSize

Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes

#include <WinAPIConv.au3>
_WinAPI_StrFormatByteSize ( $iSize )

Parameters

$iSize The numeric value to be converted.

Return Value

Success: The converted string.
Failure: Empty string and sets the @error flag to non-zero.

See Also

Search StrFormatByteSizeEx in MSDN Library.

Example

#include <WinAPIConv.au3>

Local $aVal[5] = [532, 1340, 23506, 2400016, 2400000000]

For $i = 0 To 4
        ConsoleWrite(StringFormat('%10s ' & _WinAPI_StrFormatByteSize($aVal[$i]), $aVal[$i]) & @CRLF)
Next