Burning to ISO image only works the first time

vbimport

#1

Hello

I have an issue buring to ISO-images. It works fine for the first image that is created after an VB-IDE (re)start. When I to create another ISO-image in the same VB-IDE-Session, it doesn’t work anymore.

Please mind that the IDE musst be restartet. Only restarting the program in the same IDE-session doesn’t work!

Do I maybe need to reset something before creating the next ISO-Track?

VB-IDE = Development Envoirment of Visual Basic


'enuMediaType = NERO_MEDIA_CDR
Call m_objCurrentDrive.InitImageRecorder(g_objFO.BuildPath(frmFolder.SelectedDirectory, txtName.Text & "_" & objMedia.MediaNumber & ".iso"), enuMediaType)
m_objCurrentDrive.BurnIsoAudioCD "", "", 0, objISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE, 4, enuMediaType

Regards
Raffael Walther


#2

I had this problem. I’m guessing that on the second image burn attempt it automatically aborts the job saying that it was aborted by user.

The way to resolve it is not to use the InitImageRecorder function to provide an image file name, but rather to use the OnFileSelImage event of the Nero COM object. This event will be thrown when you select the image writer as your burning drive. When the event is thrown, assign the image path and name to the string reference that is part of the event parameter of the OnFileSelImage event:

private void neroCOMObj_OnFileSelImage(ref string Filename)
{
Filename = isoImagePath;
}

once you have handled the event, you should be able to burn your disk image as many times as you like!