StrFormatByteSize64 function
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
Syntax
PTSTR StrFormatByteSize64( LONGLONG qdw, __out PTSTR pszBuf, UINT cchBuf );
Parameters
- qdw
-
Type: LONGLONG
The numeric value to be converted.
- pszBuf [out]
-
Type: PTSTR
A pointer to a buffer that, when this function returns successfully, receives the converted number.
- cchBuf
-
Type: UINT
The size of pszBuf, in characters.
Return value
Type: PTSTR
Returns the address of the converted string, or NULL if the conversion fails.
Remarks
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.
The following table illustrates how this function converts a numeric value into a text string.
| Numeric value | Text string |
|---|---|
| 532 | 532 bytes |
| 1340 | 1.30KB |
| 23506 | 22.9KB |
| 2400016 | 2.29MB |
| 2400000000 | 2.23GB |
Requirements
|
Minimum supported client | Windows 2000 Professional, Windows XP |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | StrFormatByteSize64A (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 9/7/2011
