ShlwApiStrFormatByteSizeEx Method
Converts a numeric value into a string that represents the number expressed as a size value in bytes,
kilobytes, megabytes, gigabytes, petabytes or exabytes, depending on the size.
Extends StrFormatByteSizeW by offering the option to round to the nearest displayed digit or to discard undisplayed digits.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static HResult StrFormatByteSizeEx(
ulong number,
StrFormatByteSizeFlags flags,
StringBuilder buffer,
uint bufferSize
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Unicode, ExactSpelling := true>]
Public Shared Function StrFormatByteSizeEx (
number As ULong,
flags As StrFormatByteSizeFlags,
buffer As StringBuilder,
bufferSize As UInteger
) As HResult
Dim number As ULong
Dim flags As StrFormatByteSizeFlags
Dim buffer As StringBuilder
Dim bufferSize As UInteger
Dim returnValue As HResult
returnValue = ShlwApi.StrFormatByteSizeEx(number,
flags, buffer, bufferSize)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Unicode, ExactSpelling = true)]
static HResult StrFormatByteSizeEx(
unsigned long long number,
StrFormatByteSizeFlags flags,
StringBuilder^ buffer,
unsigned int bufferSize
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Unicode, ExactSpelling = true)>]
static member StrFormatByteSizeEx :
number : uint64 *
flags : StrFormatByteSizeFlags *
buffer : StringBuilder *
bufferSize : uint32 -> HResult
No code example is currently available or this language may not be supported.
- number UInt64
-
The numeric value to be converted.
- flags StrFormatByteSizeFlags
-
Specifies whether to round or truncate undisplayed digits.
- buffer StringBuilder
-
A pointer to a buffer that, when this function returns successfully, receives the converted number.
- bufferSize UInt32
-
The size of buffer, in characters.
HResult
If this function succeeds, it returns
S_OK.
Otherwise, it returns an
HResult error code.