DVD Iso and CD Iso

I am having problems with DVD Iso file and CD Iso disks…
(Using C# And NeroCOM)

What I do is this: First, burn a DVD-R disk with a single file on it… Everything works fine here.

Next, I burn a CD-R disk with the exactly same compilation… NeroCOM complains about Cannot prepare ISO9660 Structure when I try to burn it to a CD-R…

I was suspecting it was a NeroCOM problem, so I modified the NeroFiddles which is C++ and uses NeroSDK directly, with the same result…

ANd I discovered that in NeroFiddles, if I reloaded the whole Nero DLL (call NeroAPIFree() then NeroInit()) after each burning is completed, then it can burn DVD and CD correctly…

However, I cannot seem to be able to issue a “reset all” command to NeroCOM to achieve what I want in C#…

Does anyone have the same problem? Or can anyone point me to a walk-around?

I read that nero initialization is done when you call Nero.GetDrives…so you could try it to reload it.

My original code already did a GetDrive call every time it tried to burn a new disk, so that didn’t help…

I tried to use a different AppDomain to host the Nero Interop dll, and tear down the AppDomain after each burning was completed… And it did allow me to re-load the dll most of the time, but once I called the EstimateTrackSize or the actual burning functions, the dll seemed to be locked into memory and wouldn’t allow me to unload

For those who are interested, I’ve managed to get a work-around working… Basically, I create another C# application, which sole purpose is to host Nero burning API, and to burn disk on my behalf…

In my main application, when I need to burn a disk, I fire up this app in another process, and via inter-process communication, pass it parameters about the things I want it to burn, the small app builds the track, burns it, and reports back to main application that it has completed the job, and the main application tore the process down, released Nero library with it…

And to burn the next disk, same thing happen all over again, and since Nero is re-inited everytime the process is created, there is no failed to create ISO structure errors…

(It looks like this is what’s actually been done with real Nero as well, StartSmart is like my main application, and it launches a new Nero instance for each new compilation, closes the instance down and returns back to StartSmart when burning is completed)