OnDriveStatusChanged not firing

I need to know if there is a disc in the cd drive. When I tried to use OnDriveStatusChanged it does not seem to be firing.

I am using c# and have all other events that I have tried are working.

Is there a better way of determining if there is a disc in the drive and knowing when a new one is inserted?

Below is the relevant protions of my code that I tried and did not work:

drive.EnableStatusCallback(NEROLib.NERO_DRIVESTATUS_TYPE.NDT_DISC_CHANGE, true); 

drive.OnStatusChanged += new NEROLib._INeroDriveEvents_OnDriveStatusChangedEventHandler(drive_OnDriveStatusChanged);

private void drive_OnDriveStatusChanged(NEROLib.NERO_DRIVESTATUS_RESULT driveStatus)
    Console.Writeline("Event fired");

Thanks for your help,


Actually, you should only use OnDriveStatusChanged event if you want to be notified when a disc is inserted or removed, but even this will only work if disc change notification is enabled in Windows itself. Otherwise, you would have to do the polling.

To know if a disc is currently present you can use a DeviceReady property of NeroDrive. True means the disc is present, while false means disc is not present or some other error.

Thank you for your reply! That is exactly what I needed.

The StatusCallback thing makes sence, I didnt even think about that.

can you just tell me how to enable DiscDrivechange notification in Windows Vista