Get CD Info

Greetings everybody.

I’m a software developer, and I’m writing a data backup application.
This app can write to CD or DVD. I use Roxio Drag-to-Disc for this, as it allows drive letter access to CD or DVD, with write once or RW media. (I don’t use the Ahead InCD app, since it doesn’t allow DLA with write once media.)

I need a way to find out the type of media inserted in a DVD drive. I tried to use Window’s IOCTL_STORAGE_GET_MEDIA_TYPES_EX, but it doesn’t give enough detail. So I decided to use the Nero API, as it has everything I need to know in its NeroGetCDInfo function. This function IS working for me, but it seems to have a bad side effect.

After I invoke anything in the Nero API, it seems that Roxio Drag-to-Disc gets confused. In my code, I initialize the Nero API correctly, call the NeroGetCDInfo function, and then terminate (shut down) the API correctly. After doing this, the Roxio app will not work correctly while formatting a CDRW, for example. The format will complete, but the formatted media will never mount. (This seems to be the only bad effect it has. All other aspects of Roxio seems to work OK, even after calling the Nero API.) If I never call Nero from my code, everything works fine. Likewise, if I terminate my app (which likely causes some Nero DLL to unload and possibly clean up after itself), the Roxio app then works again, and the formatted CDRW for example does mount instantly. So it seems that somehow the Nero code is messing up something in the driver layer, or at the drive itself, etc. And that terminating the Nero API via its calls (NeroDone and NeroAPIGlueDone) does not completely “reset” everything to the state it was in prior to the first call to the Nero API. This “reset” doesn’t complete until my app terminates and all of the Nero code unloads and cleans up after itself. This seems like a bug in the Nero API. I’m using Nero API version 1.06.

I seem to have two ways to go now. One, to find and fix this problem, or two, to avoid using Nero and obtain the info I need in some other way. I suspect the latter idea is better, as it’s one less piece of code in use, and simpler.

So, does anybody know how to obtain info similar to what NeroGetCDInfo gives you, but by using only Windows APIs etc. ? If not, does anybody have any idea how to fix the problem that the Nero API seems to be leaving behind after it runs ?

Thanks for any ideas you may have.

Cheers

Bob

AFAIK - certainly historically - you cannot have nero and roxio installed on the same system - more than likely that the two are “confusing” each other.

Personally I use NeroCOM in my apps to allow fully integrated burning - however the choice is yours.

Never used NeroGetCDInfo. You can use Nero CD/DVD Speed to get disc info for CD’s and DVD’s.

There has been some interaction and problems in the past if you installed both Nero and Roxio. However, I install ONLY the Drag-to-Disc part of Roxio. This currently is able to co-exist fine with Nero installed (more or less the same way that InCD can co-exist with Nero). I use Drag-to-Disc only for DLA, and use Nero for all other types of burning.

The reason I use Roxio is to make my development easier. My app was originally written to work with floppies (!) and other media (such as MO) that is all accessible via a drive letter in Windows. Drag-to-Disc gives me this capability with CD and DVD, and therefore made the adaptations to my app to work on CD and DVD very simple. To use the Nero API to do this would be much more work.

After searching this forum, I found half of the answer to my problems.
Another user, a while ago, posted a similar issue. After terminating Nero, but before ending the host app, the DVD drive acts strangely, and often won’t mount a disk. This seemed very similar to my problem. The solution was to leave Nero initialized until the host app is going to terminate.

In my case, I was initializing and terminating Nero every time I wanted to call something in it (and the other user was doing this too). I did this because I was concerned about interaction between Nero and Roxio. I didn’t want to leave Nero always “connected” to everything, thinking this might interfere with Roxio.

In the other post, there was a mention that this is a bug in the aspi layer somewhere…

I now leave Nero initialized all the time, and it’s working fine.

However, I still continue to search for a way to obtain CD info without using Nero. It seems like overkill to use the Nero API only to find out information about media in the DVD drive… There must be some way in some Windows standard APIs to do this (aspi maybe ?). Anybody have any suggestions on this ?

Thanks.