#1 Burning Software

It is currently Wed Apr 23, 2025 10:00 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Disk Space after Erasing
PostPosted: Wed Nov 22, 2006 9:54 pm 
Offline

Joined: Tue Oct 31, 2006 12:25 am
Posts: 43
Hi

Firstly, sorry for all the questions, i just want to make sure I get this right from the start.

In my app the user will need to have a completely blank disk. Naturally I check whether it needs erasing as follows:

bNeedToEraseDisk := m__UCHAR__DiscStatus in [DISC_STATUS_INCOMPLETE, DISC_STATUS_COMPLETE];


However I'm not 100% sure about checking how much disk space will be available _after_ the erase is complete.

I'm using:

if GetDiskSpaceRequiredInBytes>SelectedDevice_DiscSizeInfo.TotalDiscSize then
raise Exception.Create('Not enough space on disk');

(Where SelectedDevice_DiscSizeInfo.TotalDiscSize is set using the PrepareDSI as in your GUI demos).

Is that the best method?


Top
 Profile  
 
 Post subject: Re: Disk Space after Erasing
PostPosted: Wed Nov 22, 2006 10:43 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 12:45 am 
Offline

Joined: Tue Oct 31, 2006 12:25 am
Posts: 43
Thanks,

I've changed it to:

bNeedToEraseDisk := TRACK_INFORMATION.m__LONG__NextWritableAddress>0;


Is this the correct code to determine how much free space will be available after erasure?

(TRACK_INFORMATION.m__LONG__NextWritableAddress + TRACK_INFORMATION.m__LONG__FreeLBs) * MODE1_LB_SIZE_IN_UCHARS


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 11:24 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 11:30 pm 
Offline

Joined: Tue Oct 31, 2006 12:25 am
Posts: 43


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 11:37 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 91 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group