Hi All,
I try on this SDK this afternoon, but finally i stuck at multisession part.
From what i know. If want to burn a cd that burn b4 again, we have to use ImportIsoTrack. But i try many times, it still get bOk as false, and folder is nothing. is it anything i miss out?
other function is ok, just when go into importIsoTrack, system always return false and folder always empty.
here is my simple code:
Private Sub drive_OnDoneCDInfo(ByVal pCDInfo As INeroCDInfo) Handles drive.OnDoneCDInfo
TrackCount = pCDInfo.Tracks.Count
currentcdinfo = pCDInfo
bDone = True
End Sub
Private Sub BurnIt()
If cdSetCount <= CInt(lblCDQtyValue.Text) Then
Try
If drive.DeviceReady Then
tmrDeviceReady.Enabled = False
If isoCount < arrIsoTrack.Count Then
bDone = False
drive.CDInfo(NERO_CDINFO_FLAGS.NERO_READ_CD_TEXT)
While Not bDone = True
Application.DoEvents()
End While
Select Case burnDiscType
Case "CD"
If TrackCount > 0 Then 'if tracks exist import last one
'For i As Integer = 0 To TrackCount - 1
bDone = False
drive.ImportIsoTrack(TrackCount, NERO_IMPORT_ISO_TRACK_FLAGS.NERO_IMPORT_ISO_ONLY)
While Not bDone = True
Application.DoEvents()
End While
'Next
End If
drive.BurnIsoAudioCD("Album", "Title", True, arrIsoTrack(isoCount), Nothing, Nothing, NERO_BURN_FLAGS.NERO_BURN_FLAG_CLOSE_SESSION + NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_WRITE + NERO_BURN_FLAGS.NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW, iniSYS_CDB_CDBURNSPEED, NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_CD)
Case "DVD"
drive.BurnIsoAudioCD("Album", "Title", False, arrIsoTrack(isoCount), Nothing, Nothing, NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_WRITE + NERO_BURN_FLAGS.NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW, iniSYS_CDB_DVDBURNSPEED, NEROLib.NERO_MEDIA_TYPE.NERO_MEDIA_DVD_ANY)
End Select
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
LogError("frmBurnCD.BurnIt (1443): " & ex.Message)
End Try
End If
End Sub
Private Sub driver_OnDoneImport2(ByVal bOk As Boolean, ByVal pFolder As NeroFolder, ByVal pCDStamp As NeroCDStamp, ByVal pImportInfo As NeroImportDataTrackInfo, ByVal importResult As NERO_IMPORT_DATA_TRACK_RESULT) Handles drive.OnDoneImport2
If bOk = True Then
currentcdstamp = pCDStamp
originaliso = New NeroISOTrack
originaliso.RootFolder = pFolder
Dim r As New TreeNode
r.ForeColor = System.Drawing.Color.Navy
r.Text = "Root"
r.Tag = pFolder
trcompilation.Nodes.Add(r)
For Each f As NeroFolder In pFolder.Folders
Dim t As New TreeNode
t.ForeColor = System.Drawing.Color.Navy
t.Text = f.Name
t.Tag = f
r.Nodes.Add(t)
'recursivefolderdisplay(f, t)
Next
For Each fi As NeroFile In pFolder.Files
Dim t As New TreeNode
t.ForeColor = System.Drawing.Color.Navy
t.Text = fi.Name
t.Tag = fi
r.Nodes.Add(t)
Next
trcompilation.SelectedNode = r
Else
Dim r As New TreeNode
Dim rf As New NeroFolder
currentcdstamp = pCDStamp
originaliso = New NeroISOTrack
originaliso.RootFolder = rf
r.Text = "Root"
r.Tag = rf
trcompilation.Nodes.Add(r)
trcompilation.SelectedNode = r
End If
bDone = True
End Sub
Thx for reading, and waiting for some answer here.
Best Regards
SuNc