IPXV_Inst::FormatFileSize Method

From PDF XChange PDF SDK
Jump to: navigation, search
Line 10: Line 10:
 
::<tt>8791 to "8.58 KB (8,791 bytes)"</tt>
 
::<tt>8791 to "8.58 KB (8,791 bytes)"</tt>
 
::<tt>4022817 to "3.84 MB (4,022,817 bytes)"</tt>
 
::<tt>4022817 to "3.84 MB (4,022,817 bytes)"</tt>
 +
 +
The method uses the current UI-localization.
  
 
== Syntax ==
 
== Syntax ==

Revision as of 14:19, 28 May 2015


Converts the specified file size in bytes to display string. For example:

349 to "0.34 KB (349 bytes)"
8791 to "8.58 KB (8,791 bytes)"
4022817 to "3.84 MB (4,022,817 bytes)"

The method uses the current UI-localization.

Syntax

HRESULT FormatFileSize([in]                   ULONGLONG     nSize,
                       [in, defaultvalue(0)]  VARIANT_BOOL  bShort,
                       [out, retval]          BSTR*         ppRes);

Parameters

nSize
[in] Number of bytes.
bShort
[in, defaultvalue(0)] Specifies the option to make short display-string. For example with true value you will get "0.34 KB" instead of "0.34 KB (349 bytes)".
ppRes
[out, retval] Returns string as result of converting.

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

IPXV_Inst