StrFormatByteSizeStrFormatByteSize*
*Contents  *Index  *Topic Contents
*Previous Topic: StrDup
*Next Topic: StrFromTimeInterval

StrFormatByteSize


LPTSTR StrFormatByteSize(
    DWORD dw,
    LPSTR pszBuf, 
    UINT cchBuf
    );

Converts a numeric value into a string that represents the number expressed as a size value in bytes, KB, MB, or GB, depending on the size.

dw
Numeric value to be converted.
pszBuf
Address of the converted string.
cchBuf
Size of pszBuf, in characters.

Example:

       532 -> 532 bytes
      1340 -> 1.3KB
     23506 -> 23.5KB
   2400016 -> 2.4MB
2400000000 -> 2.4GB

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.