Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, Automatically updating drives collection at International Chat: Software related forum; Hi everyone, I am creating an application in C# - so far so good except for one niggling issue. This application is likely to run on a laptop which may occassionally have an external USB DVD-R/RW drive attached. I would like to be able to detect a newly plugged-


Reply
 
Thread Tools
Old 16-02-2005   #1 (permalink)
New on Forum
 
Join Date: Feb 2005
Posts: 3
Automatically updating drives collection

Hi everyone,

I am creating an application in C# - so far so good except for one niggling issue.

This application is likely to run on a laptop which may occassionally have an external USB DVD-R/RW drive attached. I would like to be able to detect a newly plugged-in USB drive while the application is still running.

I have done the usual populating of a Drives collection through the NeroClass.getDrives method. I call this method again soon after plugging the drive in but nothing happened. The Drives collection did not increase to include the newly plugged-in drive!

I noticed that Nero automatically lists the new drive in the dropdownlist/combobox, so obviously this is possible. Can someone please tell me how the API can let me do this?

Any suggestions would be greatly appreciated.

Cheers,
Dany.
DanyWu is offline   Reply With Quote
Old 16-02-2005   #2 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
By calling EnableDriveChangeCallback() on a Nero object you will be notified each time a drive is added or removed with the OnDriveStatusChanged() event.

In the event handler, get the new drives collection and search for your drive using the hostID and targetID (you will find a drive only if it is added).
alexp is offline   Reply With Quote
Old 17-02-2005   #3 (permalink)
New on Forum
 
Join Date: Feb 2005
Posts: 3
Re: Automatically updating drives collection

Hi there,

Thanks for the reply. I added an extra line of code like this:

nero.EnableDriveChangeCallback(true); //nero is the name of the NeroClass object.

Unfortunately this line failed with an error message saying: "Cannot register callback".

Any ideas what this may mean? Did I call the method incorrectly?

Cheers,
Dany.
DanyWu is offline   Reply With Quote
Old 17-02-2005   #4 (permalink)
New on Forum
 
Join Date: Feb 2005
Posts: 3
Re: Automatically updating drives collection

Whoops - nevermind. Got it sorted now. For some reason I cannot call that method prior to calling .GetDrives method for the first time. Everything works now.
DanyWu is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
updating firmware for oe drives tabboo Newbie Forum 1 04-02-2007 00:59
a question probably asked a million times - uninstalling drives after updating supertzar Alcohol 1 28-02-2006 11:01
Nero - automatically updating compilation regardless & cannot turn off virus scanner Rich Nero & InCD 2 04-07-2004 11:31
cant see drives when updating firmware johnisme LiteOn / PLDS/ Sony Burner 5 18-06-2004 19:19
Subs on automatically NDTV DVD2One 1 13-07-2003 18:33


All times are GMT +2. The time now is 05:57.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0