IPXV_Inst::FormatFileSize Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
Line 3: | Line 3: | ||
{{#customTitle:IPXV_Inst::FormatFileSize Method}} | {{#customTitle:IPXV_Inst::FormatFileSize Method}} | ||
{{#parentPage:PXV:IPXV_Inst#Methods|FormatFileSize|method}} | {{#parentPage:PXV:IPXV_Inst#Methods|FormatFileSize|method}} | ||
− | |||
{{ToReview}} | {{ToReview}} | ||
− | + | Converts the specified file size in bytes to display string. For example: | |
+ | |||
+ | ::<tt>349</tt> to <tt>"0.34 KB (349 bytes)"</tt> | ||
+ | ::<tt>8791</tt> to <tt>"8.58 KB (8,791 bytes)"</tt> | ||
+ | ::<tt>4022817</tt> to <tt>"3.84 MB (4,022,817 bytes)"</tt> | ||
+ | |||
== Syntax == | == Syntax == | ||
Line 15: | Line 19: | ||
== Parameters == | == Parameters == | ||
;nSize | ;nSize | ||
− | :[in] | + | :[in] Number of bytes. |
;bShort | ;bShort | ||
− | :[in, defaultvalue(0)] | + | :[in, defaultvalue(0)] Specifies the option to make short display-string. For example with <tt>true</tt> value instead of <tt>"0.34 KB (349 bytes)"</tt> you will get <tt>"0.34 KB"</tt>. |
;ppRes | ;ppRes | ||
− | :[out, retval] | + | :[out, retval] Returns string as result of converting. |
== Return Value == | == Return Value == |
Revision as of 14:10, 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)"
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 instead of "0.34 KB (349 bytes)" you will get "0.34 KB".
- ppRes
- [out, retval] Returns string as result of converting.
Return Value
Returns S_OK if operation was successful or error code in other cases.