Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StrFormatKBSize

StrFormatKBSize function

Converts a numeric value into a string that represents the number expressed as a size value in kilobytes.

Syntax


PTSTR StrFormatKBSize(
        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 a pointer to the converted string, or NULL if the conversion fails.

Remarks

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

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

StrFormatKBSizeW (Unicode) and StrFormatKBSizeA (ANSI)

See also

StrFormatByteSizeA
StrFormatByteSizeW

 

 

Community Additions

ADD
Show:
© 2015 Microsoft