From: Null on 11 Mar 2010 11:33 How can I get amount of free space on physical drive (eg. \\. \PhysicalDrive0 )? I tried to use GetDiskFreeSpaceEx function but it didn't work. Thanks for help.
From: Uwe Sieber on 13 Mar 2010 06:04 Null wrote: > How can I get amount of free space on physical drive (eg. \\. > \PhysicalDrive0 )? > I tried to use GetDiskFreeSpaceEx function but it didn't work. > Thanks for help. \\.\PhysicalDrive is a symbolic link to a DISK device. Disks just have a certain number of bytes. Usually disks have one ore more partitions. So, "free space on physical drive" could be read as "unpartitioned space". What you can do with disks is to read and write data and to send IO control request which have DISK in its name, like IOCTL_DISK_GET_DRIVE_LAYOUT, IOCTL_DISK_GET_PARTITION_INFO, IOCTL_DISK_GET_DRIVE_GEOMETRY etc. I think what you mean is the free space on logical drive. A partition usually is formatted with a file system, the file system is mounted as a logical drive, a "storage volume". Storage volumes have "free space" and that is what GetDiskFreeSpaceEx works with. It can be called with a path to a folder, like "C:\" or "\\computer\share\". A volume name like "\\?\Volume{519c7010-52ae-11de-83f5-806d6172696f}\" works too. Uwe
|
Pages: 1 Prev: Help - trying to create a very basic renderer Next: Status Bars stuff not defined, why? |