[DllImport ( "Shlwapi.dll", CharSet = CharSet.Auto )]
public static extern long StrFormatByteSize (
long fileSize
, [MarshalAs ( UnmanagedType.LPTStr )] StringBuilder buffer
, int bufferSize );
Declare Function StrFormatByteSize Lib "shlwapi.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
None.
Please add some!
long filelength = 123456789;
StringBuilder sb = new StringBuilder ();
Explorer.StrFormatByteSize ( filelength, sb, 20 ); // this is not a magic number. I think 8 is the minimum
Console.WriteLine ( sb );