[VB6] ImportIsoTrack

Hi!
I’m trying to import a previews session.
When i Burn cd receive this error (“An asynchronous operation is in progress! You can’t have two operation at the some time”)
This is my code:


    Set Folder = New NeroFolder
    Dim drives As INeroDrives
    Set drives = nero.GetDrives(NERO_MEDIA_CDR)
    Set drive = drives(AvailableDevices.ListIndex)
    Dim isotrack As NeroISOTrack
    Set isotrack = New NeroISOTrack
    drive.ImportIsoTrack 1, NERO_IMPORT_ISO_ONLY
    isotrack.RootFolder = Folder
    Dim file As NeroFile
    Set file = New NeroFile
    Folder.Files.Add file
    file.Name = "myfile"
    file.SourceFilePath = "mypath"
    
    
    isotrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET
    
    drive.BurnIsoAudioCD "", "", 0, isotrack, Nothing, Nothing, NERO_BURN_FLAG_SIMULATE + NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_CLOSE_SESSION, 0, NERO_MEDIA_CD


Help me please!

Thanks and sorry for my bad english

The problem is that ImportIsoTrack returns immediately while asynchronous operation is pending.
OnDoneImport event should be handled to know when this ends. Only then can
BurnIsoAudioCD be called.

Calling BurnIsooAudioCD after OnDoneImport event I receive the same error. Anyway the execution of ImportIsoTrack seems to go wrong: with OnDoneImport I can handle the end of ImportIsoTrack, but it doesn’t execute completely the operation.

Originally posted by mcathor
Calling BurnIsooAudioCD after OnDoneImport event I receive the same error.

Yes, this is a confirmed problem. It will be fixed in the upcoming version.

Anyway the execution of ImportIsoTrack seems to go wrong: with OnDoneImport I can handle the end of ImportIsoTrack, but it doesn’t execute completely the operation.

What do you mean by “seems to go wrong”? What is wrong exactly?

Try importing track 0 instead of 1 if you have only one track on the disc. Tracks’ order numbers begin with zero.

So after I call drive.importisotrack the drive_OnDoneImport should be triggered?

If thats correct, and it doesnt do it, thats is what will be updated in the new fix?

How do I receive the number of previous iso tracks on the CD?

I need this in order to import all of the previous tracks with a loop like this

For 0 to ia
drive.importisotrack ia, NERO_IMPORT_ISO_ONLY
ia = ia + 1
next ia

then all of the previous tracks will be added when the drive.burn line is ran?

but if my thinking is wrong please tell me