#1 Burning Software

It is currently Fri Dec 20, 2024 1:40 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Warning if non-empty disc?
PostPosted: Mon Apr 18, 2005 8:06 pm 
My program asks the user to insert an empty disc which I am then going to write my data onto. I want to be able to warn the user if they insert a non-empty disc.

So what is the best way to determine if a disc is not empty? I can call StarBurn_CdvdBurnerGrabber_GetDiscInformation(), but then should I check m__UCHAR__DiscStatus, m__UCHAR__LastSessionStatus, or both? Or should I call StarBurn_CdvdBurnerGrabber_GetTrackInformation with the track # set to TRACK_NUMBER_INVISIBLE, and check if the session # is not 1?

I would like to detect all kinds of different non-empty discs - DAO, TAO, SAO, music, data, etc. ...


Top
  
 
 Post subject: Re: Warning if non-empty disc?
PostPosted: Mon Apr 18, 2005 9:09 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
As you've mentioned there could be a lot of ways doing this. I prefer myself to call GetTrackInformation( ... ) passing TRACK_NUMBER_INVISIBLE and check NWA for that track. If it's >0 this means disc has some data on it and is not blank.

betty crokker wrote:
My program asks the user to insert an empty disc which I am then going to write my data onto. I want to be able to warn the user if they insert a non-empty disc.

So what is the best way to determine if a disc is not empty? I can call StarBurn_CdvdBurnerGrabber_GetDiscInformation(), but then should I check m__UCHAR__DiscStatus, m__UCHAR__LastSessionStatus, or both? Or should I call StarBurn_CdvdBurnerGrabber_GetTrackInformation with the track # set to TRACK_NUMBER_INVISIBLE, and check if the session # is not 1?

I would like to detect all kinds of different non-empty discs - DAO, TAO, SAO, music, data, etc. ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 9:31 pm 
Thanks!

What would it mean if m__BOOLEAN__IsNextWritableAddressValid is false (in TRACK_INFORMATION)? Does that mean the CD is completely unformatted, or that it's completely full?


Top
  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 9:34 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
This means track is not blank (recorded). GetTrackInformation( TRACK_NUMBER_INVISIBLE ) would fail on "closed" disc.

Anonymous wrote:
Thanks!

What would it mean if m__BOOLEAN__IsNextWritableAddressValid is false (in TRACK_INFORMATION)? Does that mean the CD is completely unformatted, or that it's completely full?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 10:15 pm 
Sorry, I'm a little slow today (it is Monday, after all) ...

So if I call GetTrackInformation( TRACK_NUMBER_INVISIBLE ) and it fails (does not return EN_SUCCESS), that means that the disc has been closed, so I should go ahead and check the TOC to see what's on the disc.

If GetTrackInformation( TRACK_NUMBER_INVISIBLE ) succeeds (returns EN_SUCCESS) but m__BOOLEAN__IsNextWritableAddressValid is FALSE, that means the invisible track has been recorded? So the disc is not empty, and I should check the TOC to see what's on the disc?


Top
  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 7:31 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
1) Yes, EXACTLY!

2) It just cannot happen. I've never seen this ever :)

Anonymous wrote:
Sorry, I'm a little slow today (it is Monday, after all) ...

So if I call GetTrackInformation( TRACK_NUMBER_INVISIBLE ) and it fails (does not return EN_SUCCESS), that means that the disc has been closed, so I should go ahead and check the TOC to see what's on the disc.

If GetTrackInformation( TRACK_NUMBER_INVISIBLE ) succeeds (returns EN_SUCCESS) but m__BOOLEAN__IsNextWritableAddressValid is FALSE, that means the invisible track has been recorded? So the disc is not empty, and I should check the TOC to see what's on the disc?


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 3 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