Export (0) Print
Expand All
4 out of 5 rated this helpful - Rate this topic

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


PSTR StrFormatByteSize64(
  LONGLONG qdw,
  _Out_  PSTR pszBuf,
  UINT cchBuf
);

Parameters

qdw

Type: LONGLONG

The numeric value to be converted.

pszBuf [out]

Type: PSTR

A pointer to a buffer that, when this function returns successfully, receives the converted number.

cchBuf

Type: UINT

The size of the buffer pointed to by pszBuf, in characters.

Return value

Type: PSTR

Returns a pointer to 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 valueText string
532532 bytes
13401.30 KB
2350622.9 KB
24000162.28 MB
24000000002.23 GB

 

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

StrFormatByteSize64A (ANSI)

See also

StrFormatByteSizeA
StrFormatByteSizeW

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.