Expert Software Company : News

duminică, 28 octombrie 2012

Converirea dimensiune fisier in valoarea corespunzatoare


Function _ApiFileSize(tnBytes As Number)
Text To Exemple NoShow TextMerge
   = _ApiFileSize(532)
   = _ApiFileSize(1340)
   = _ApiFileSize(23506)
   = _ApiFileSize(2400016)
   = _ApiFileSize(2400000000)
   = _ApiFileSize(4294967295)
EndText
Declare STRING StrFormatByteSize IN Shlwapi INTEGER dw, STRING @ pszBuf, INTEGER cchBuf
    pszBuf = SPACE(50)
    Return Transform(tnBytes) +  " -> " +  StrFormatByteSize (m.tnBytes, @pszBuf, Len(pszBuf))
EndFunc

Niciun comentariu:

Trimiteți un comentariu