Private Declare Function GetVolumeInformation
Lib "kernel32"
Alias "GetVolumeInformationA" (
ByVal lpRootPathName
As String,
ByVal lpVolumeNameBuffer
As String,
ByVal nVolumeNameSize
As Long, lpVolumeSerialNumber
As Long, lpMaximumComponentLength
As Long, lpFileSystemFlags
As Long,
ByVal lpFileSystemNameBuffer
As String,
ByVal nFileSystemNameSize
As Long)
As Long
Private Declare Function GetDriveType&
Lib "kernel32"
Alias "GetDriveTypeA" (
ByVal nDrive
As String)
Private Declare Function GetDiskFreeSpace
Lib "kernel32"
Alias "GetDiskFreeSpaceA" (
ByVal lpRootPathName
As String, lpSectorsPerCluster
As Long, lpBytesPerSector
As Long, lpNumberOfFreeClusters
As Long, lpTtoalNumberOfClusters
As Long)
As Long
' Определение типа дисковода
driveName = GetDrive("C:\"
' Определение метки тома, серийного номера диска и файловой системы
GetVolume pathName, drvVolumeName, drvSerialNo, drvFileSystem
' Определение размера диска
GetSize pathName, free, total