Discussion:
how to determine free space on a specific CD drive ?
(too old to reply)
Mark Beiley
2007-08-22 03:14:32 UTC
Permalink
I know the drive letter of the CD drive, and am trying to figure out how
much free space is on the CD in that drive. How can I do this?

For example, I know the drive is D:. I know I can use the IDiscMaster
interface to enumerate through all of the individual recorders, and then use
IDiscRecorder::QueryMediaInfo to get the free space on the disk in each
recorder, but how do I know which recorder goes with my D: drive?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com
Mark Beiley
2007-08-23 15:59:11 UTC
Permalink
I found a solution to my own question, so am posting the answer here...

You can use CreateFile() on the drive letter, and then use that handle in
DeviceIoControl() with IOCTL_SCSI_PASS_THROUGH, to get the
vendor/product/revision of the physical drive for this drive letter. Now
use IDiscMaster to enumerate through all of the IDiscRecorder's, comparing
the vendor/product/revision, until you find a match. Once you have the
right IDiscRecorder, you can use QueryMediaInfo to find the free space.

Thanks,
Mark
--
Beiley Software
http://www.beiley.com
Post by Mark Beiley
I know the drive letter of the CD drive, and am trying to figure out how
much free space is on the CD in that drive. How can I do this?
For example, I know the drive is D:. I know I can use the IDiscMaster
interface to enumerate through all of the individual recorders, and then
use IDiscRecorder::QueryMediaInfo to get the free space on the disk in
each recorder, but how do I know which recorder goes with my D: drive?
Thanks,
Mark
--
Beiley Software
http://www.beiley.com
Loading...