Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.26 KB

StrFormatByteSize.md

File metadata and controls

71 lines (49 loc) · 1.26 KB

Home

Function name : StrFormatByteSize

Group: String - Library: shlwapi


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.


Code examples:

String representation for disk or memory capacity

Declaration:

PSTR StrFormatByteSizeA(
         DWORD dw,
  __out  PSTR pszBuf,
         UINT cchBuf
);

PWSTR StrFormatByteSizeW(
         LONGLONG qdw,
  __out  PWSTR pszBuf,
         UINT cchBuf
);

PTSTR StrFormatByteSize64(
         LONGLONG qdw,
  __out  PTSTR pszBuf,
         UINT cchBuf
);  

FoxPro declaration:

DECLARE STRING StrFormatByteSizeA IN Shlwapi;
	INTEGER dw,;
	STRING @pszBuf,;
	INTEGER cchBuf
  

Parameters:

dw / qdw [in] Numeric value to be converted.

pszBuf / pwszBuf [out] Pointer to the converted string.

cchBuf [in] Size of pszBuf, in characters.


Return value:

Returns the address of the converted string, or NULL if the conversion fails.


Comments:

See also: StrFormatByteSize64, StrFormatByteSizeEx, StrFormatKBSize