Жжошь
Выделять по 4 байта памяти на переменные это сильно, да
Define.s root_name, volume_name, system_name
Define.l volume_serial, max_length, system_flags
Define.q free_bytes_avail, total_bytes, total_free_bytes
volume_name = Space(#MAX_PATH)
system_name = Space(#MAX_PATH)
drives_avail = GetLogicalDrives_()
For i = 0 To 31
If ((drives_avail >> i) & 1)
root_name = Chr(i + 65) + ":\"
If (GetVolumeInformation_(root_name, @volume_name, #MAX_PATH, @volume_serial, @max_length, @system_flags, @system_name, #MAX_PATH))
Debug "Root name " + root_name
Debug "Volume name " + volume_name
Debug "Serial " + Hex(volume_serial)
Debug "Flags " + Str(system_flags)
Debug "File system " + system_name
EndIf
If (GetDiskFreeSpaceEx_(root_name, @free_bytes_avail, @total_bytes, @total_free_bytes))
Debug "Free bytes available " + Str(free_bytes_avail >> 20)
Debug "Total bytes " + Str(total_bytes >> 20)
Debug "Total free bytes " + Str(total_free_bytes >> 20)
EndIf
EndIf
Next
End