#1 Burning Software

It is currently Thu Dec 19, 2024 6:44 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: CD/DVD load/eject monitoring
PostPosted: Tue Oct 16, 2007 4:42 pm 
Offline

Joined: Mon Oct 08, 2007 12:00 pm
Posts: 7
Hello,
I would like to ask a suggestion.

In my application, I need to know when the user takes out the CD/DVD from the system. The I need to know when he/she loaded a new one.

I think that I have to use StarBurn_CdvdBurnerGrabber_CreateEx() and StarBurn_CdvdBurnerGrabber_GetDeviceInformation() under a separate thread or under a WM_TIMER message. What do you think? What you please suggest?

Thanks and regards.

GianniP.

PS: all the other doubt, has been solved thanks to your prompt and full reply to other developers. This forum is quite a good job! :)


Top
 Profile  
 
 Post subject: Re: CD/DVD load/eject monitoring
PostPosted: Wed Oct 17, 2007 6:23 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
This is not very good idea... You'd better have device handle allocated and initialized and GetMediaTrayStatus(...) called. However you need to understand - while you have device handle opened you effectively disable new file system mount over the inserted optical media. In the other words you'll not be able to read disc content with the Explorer while you keep StarBurn handle opened.

Thanks :)

GianniP wrote:
Hello,
I would like to ask a suggestion.

In my application, I need to know when the user takes out the CD/DVD from the system. The I need to know when he/she loaded a new one.

I think that I have to use StarBurn_CdvdBurnerGrabber_CreateEx() and StarBurn_CdvdBurnerGrabber_GetDeviceInformation() under a separate thread or under a WM_TIMER message. What do you think? What you please suggest?

Thanks and regards.

GianniP.

PS: all the other doubt, has been solved thanks to your prompt and full reply to other developers. This forum is quite a good job! :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2007 10:38 am 
Offline

Joined: Mon Oct 08, 2007 12:00 pm
Posts: 7
Thanks for you fast reply.

I did in this way, every 500ms under WM_TIMER:
a) StarBurn_CdvdBurnerGrabber_CreateEx to get the handle
b) StarBurn_CdvdBurnerGrabber_Lock
c) StarBurn_CdvdBurnerGrabber_GetMediaTrayStatus
d) StarBurn_CdvdBurnerGrabber_Release
e) StarBurn_Destroy()

It works! :)

Just I would ask you: is better put it under a Thread or under a WM_TIMER (like I did)?

Second:
"StarBurn_CdvdBurnerGrabber_StopPlayScan" is still working work "only for Track-At-Once & CD recording" as you state in this post? viewtopic.php?t=670&highlight=stopplayscan

Thanks again. Best regards.

PS: when you will update your PDF manual, remember also that in each page, in the foot-note, there is written "Applicaion" instead of "Application"... just to help. :D
... and meanwhile, if you can, try to have an index in the same PDF... too slow to search in all the 714 pages (not complaining, absolutely)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2007 12:48 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Yes, this is exactly how it works in Windows and Linux - polling thread pinging device with either "get media & tray status" or "test unit ready" (for really old units).

Sure! There are a lot of grammar errors actually :( Working on fixes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2007 1:10 pm 
Offline

Joined: Mon Oct 08, 2007 12:00 pm
Posts: 7
Thanks.

Can you please reply also to the second point? (There was also a double "working work" :lol: )

Second:
"StarBurn_CdvdBurnerGrabber_StopPlayScan" is still working "only for Track-At-Once & CD recording" as you state in this post? viewtopic.php?t=670&highlight=stopplayscan


Thanks and regards.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2007 1:15 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Yes, it's required for TAO only.

GianniP wrote:
Thanks.

Can you please reply also to the second point? (There was also a double "working work" :lol: )

Second:
"StarBurn_CdvdBurnerGrabber_StopPlayScan" is still working "only for Track-At-Once & CD recording" as you state in this post? viewtopic.php?t=670&highlight=stopplayscan


Thanks and regards.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2007 2:06 pm 
Offline

Joined: Mon Oct 08, 2007 12:00 pm
Posts: 7
Hello, again me.

Based on your reply, I have a doubt: here is what I found in the manual:
This function resets media state inside CD/DVD burner device object. This actions
allow to update disc content w/o need to eject the disc. Could be used for
multiple burnings w/o disc eject or manual disc data verification.


1) I'm writing in TAO mode on a DVD+RW. I tried the StopPlayScan() and it get back with a failed result. Is this right or not?
2) I really need to find a way by which I can update the disc content (after data burned) w/o ejecting the tray. Thus:
2.1) is StopPlayScan() the only function avalaible for this purpose?
2.2) if positive to the question 2.1) and question 1), there is any other way by which I can update the content (i.e. using other functions)?

Again thanks.

Gianni.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 8:25 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
1) Yes, it's OK for it to fail on the DVDs.

2) You can use set of the IOCTLs forcing Windows to dismount and then mount the volume. The logic should be like this.

a) Open handle
b) Burn
c) Close handle
d) Open Windows handle
e) Dismount
f) Mount
g) Close Windows handle

For SPTI or SPTD based operation device name lookup and matching (drive-letter based) should be trivial.

Good luck :)

GianniP wrote:
Hello, again me.

Based on your reply, I have a doubt: here is what I found in the manual:
This function resets media state inside CD/DVD burner device object. This actions
allow to update disc content w/o need to eject the disc. Could be used for
multiple burnings w/o disc eject or manual disc data verification.


1) I'm writing in TAO mode on a DVD+RW. I tried the StopPlayScan() and it get back with a failed result. Is this right or not?
2) I really need to find a way by which I can update the disc content (after data burned) w/o ejecting the tray. Thus:
2.1) is StopPlayScan() the only function avalaible for this purpose?
2.2) if positive to the question 2.1) and question 1), there is any other way by which I can update the content (i.e. using other functions)?

Again thanks.

Gianni.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group