Hello…
I have inserted disk in CD R/W drive when i use GetDiskFreeSpaceEx…i’m not able to get free sapce and used space…Any one has idea as how to get the disk free space of CD or DVD…
Thanks
PoornimaNiranjan
Hello…
I have inserted disk in CD R/W drive when i use GetDiskFreeSpaceEx…i’m not able to get free sapce and used space…Any one has idea as how to get the disk free space of CD or DVD…
Thanks
PoornimaNiranjan
This free space is - as reported by CDFS or UDF.
Often, the burning software (used to create the disk) just generates too
small CDFS/UDF volume, which is 100% full with data, and is much smaller then
the media size.
This way you will see 150MB CDs with 0% free space and 1400MB DVDs, again
with 0% of free space.
This means - when generating the UDF volume, the burner app decided to
generate it of the size of 1400MB, even if the DVD media supports > 4GB. Then
the app generated this volume (with zero free space within it) and burned it to
the media, leaving the media tail not used.
Windows shell uses GetDiskFreeSpaceEx/NtQueryVolumeInformationFile to get
these sizes, the FS level queries, and will get - 1400MB total, 0MB free. All
is OK.
To get the real physical media size of the CD/DVD disc, you need MMC
commands. GetDiskFreeSpaceEx/NtQueryVolumeInformationFile cannot send them.
This must be some handicrafted piece of code like the one in the burning apps.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntfsd…
> Hello…
>
> I have inserted disk in CD R/W drive when i use GetDiskFreeSpaceEx…i’m not
able to get free sapce and used space…Any one has idea as how to get the disk
free space of CD or DVD…
>
> Thanks
> PoornimaNiranjan
>
Issue “read track information” command with 0xFF alias (“track number = invisible”) and you’ll
have number of the logical blocks you still can write to. If the command will fail - disc is closed
and you have ZERO free space on it. For recordable media you’re done, for rewritable media you need
to do erase (sometimes full) or “unclose” last session (if the hardware supports such a feature).
For random access rewritable media (+RW or -RAM or packet-formatted DVD-RW or CD-RW) amount of the
free space is whole disc capacity (issue “read formatted capacity” command and pick up largest possible
value from the command response structures) MINUS amount of the already recorded data (parse file
system structures or ask Windows to tell you something - but it will lie…). The same for the Blu-Ray
recordable (in most of the cases formatted as pseudo-random access, special remapping zone used) and
BD rewritable.
Hope this helped
Anton
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@tataelxsi.co.in
Sent: Tuesday, August 21, 2007 12:21 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Getting Disk free Space of CD or DVD
Hello…
I have inserted disk in CD R/W drive when i use GetDiskFreeSpaceEx…i’m not able to get free sapce and used space…Any one has idea as how to get the disk free space of CD or DVD…
Thanks
PoornimaNiranjan
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: xxxxx@rocketdivision.com
To unsubscribe send a blank email to xxxxx@lists.osr.com