StrFormatByteSize

[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr StrFormatByteSize(
   ulong qdw,
   [MarshalAs(UnmanagedType.LPWStr)] string pszBuf,
   uint cchBuf
);

Microsoft documentation: Link

Last updated