Restored from previous forum. Originally posted by freak.
It would be nice to be able to determine the disk type & manufacturer as well.
Well, I don't know about the Size, but about the disk type:
Code: Select all
name.s = "C:\"
type.b = GetDriveType_(@name)
Return Values
DRIVE_UNKNOWN The drive type cannot be determined.
DRIVE_NO_ROOT_DIR The root path is invalid. For example, no volume is mounted at the path.
DRIVE_REMOVABLE The disk can be removed from the drive.
DRIVE_FIXED The disk cannot be removed from the drive.
DRIVE_REMOTE The drive is a remote (network) drive.
DRIVE_CDROM The drive is a CD-ROM drive.
DRIVE_RAMDISK The drive is a RAM disk.
Unfortunately, none of these Constants is known by PB, so here are the Values:
Code: Select all
#DRIVE_UNKNOWN = 0
#DRIVE_ABSENT = 1
#DRIVE_REMOVABLE = 2
#DRIVE_FIXED = 3
#DRIVE_REMOTE = 4
#DRIVE_CDROM = 5
#DRIVE_RAMDISK = 6
About the manufacturer: It seems, that my Win98SE doesn't know the manufacturer of the drives. (In the Registry, they are all named as: manufacturer="GENERIC")
WinXP knows the HDD as a Maxtor drive, so maybe there's a way to get the manufacturer name on XP, but I don't know it. (Maybe your program can search the Registry for a value named "manufacturer")
That's it, hope it helps...
Timo
A debugged program is one for which you have not yet found the conditions that make it fail.