Hi
I am trying to calculate free space in RW media. first I have erased the disc , then i am trying to calculate free space, but still I am getting 0 for free space.
I am doing as follows
1) StarBurn_CdvdBurnerGrabber_GetTOCInformation is used to get toc information
if toc informtion is there then calculate nooftracks
*numberOfTracks = tocInformation.m__UCHAR__NumberOfTracks;
2)StarBurn_CdvdBurnerGrabber_GetTrackInformation it return false
Exception CStarBurn_ScsiTransportSPTI::ExecuteCDB(),
I am not sure why StarBurn_CdvdBurnerGrabber_GetTrackInformation fails for RW media, however it works fine for Blank R disc
3)As per sample if tocread if true then following code is executed
if ( tocRead )
{
LARGE_INTEGER trackSpace;
trackSpace.QuadPart = 0;
for (int tocIndex = 0; tocIndex < tocInformation.m__UCHAR__NumberOfTracks; tocIndex ++ )
{
TOC_ENTRY tocEntry = tocInformation.m__TOC_ENTRY[tocIndex];
trackSpace.QuadPart = (LONGLONG)(tocEntry.m__LONG__EndingLBA - tocEntry.m__LONG__StartingLBA) ;
trackSpace.QuadPart *= (LONGLONG) tocEntry.m__ULONG__LBSizeInUCHARs;
usedSpace->QuadPart +=trackSpace.QuadPart;
freeSpace->QuadPart = 0;
}
}
but it doesnot show right value for freespace as it is made to 0 in last line.
Can I get some idea how to calculate free space.???
Thanks
|