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.