IPXV_Inst::FormatFileSize Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
Line 14: Line 14:
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT FormatFileSize([in]                  ULONGLONG    nSize,
+
<pre class="brush:cpp;gutter:false">HRESULT FormatFileSize([in]                  ULONGLONG    Size,
                       [in, defaultvalue(0)]  VARIANT_BOOL  bShort,
+
                       [in, defaultvalue(0)]  VARIANT_BOOL  Short,
                       [out, retval]          BSTR*        sRes);</pre>
+
                       [out, retval]          BSTR*        Res);</pre>
  
 
== Parameters ==
 
== Parameters ==
;nSize
+
;Size
 
:[in]  Number of bytes.
 
:[in]  Number of bytes.
;bShort
+
;Short
 
:[in, defaultvalue(0)]  Specifies the option to make short display-string. For example with <tt>true</tt> value you will get <tt>"0.34 KB"</tt> instead of <tt>"0.34 KB (349 bytes)"</tt>.
 
:[in, defaultvalue(0)]  Specifies the option to make short display-string. For example with <tt>true</tt> value you will get <tt>"0.34 KB"</tt> instead of <tt>"0.34 KB (349 bytes)"</tt>.
;sRes
+
;Res
 
:[out, retval]  Returns string as result of converting.
 
:[out, retval]  Returns string as result of converting.
  

Revision as of 07:32, 12 June 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     Size,
                       [in, defaultvalue(0)]  VARIANT_BOOL  Short,
                       [out, retval]          BSTR*         Res);

Parameters

Size
[in] Number of bytes.
Short
[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)".
Res
[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