When I click on the burn button on my app I get an error and burning doesn’t even start. I’m burning images from a specified directory. I’m using NeroCom and Visual Basic. Here is the part of the code that is causing the error::
Public WithEvents Drive As NeroDrive
Dim nDrives As INeroDrives
Dim nFolder As INeroFolder
Dim nISOTrack As NeroISOTrack
Private Sub BuildFileTree()
Dim neroTmpFile As NeroFile
Dim name As String
Dim index As Integer
'add all files in current directory
For index = 0 To listFiles.ListCount - 1 'listFiles is a ListBox that list all files' name that I need to burn
Set neroTmpFile = New NeroFile
name = listFiles.List(index)
neroTmpFile.name = name
neroTmpFile.SourceFilePath = gszHardcopyPath & "\" & name
nFolder.Files.Add neroTmpFile
Next
End Sub
Private Sub rbtnBurn_Click()
Dim fso As Scripting.FileSystemObject
Dim burnFolder As NeroFolder
Dim nFileSystemDescContainer As NeroFileSystemDescContainer
On Error GoTo PROC_EXIT
Set fso = New Scripting.FileSystemObject
Set Drive = nDrives(0)
Set nFolder = New NeroFolder
Set nISOTrack = New NeroISOTrack
Set nFileSystemDescContainer = New NeroFileSystemDescContainer
driveFinished = False
burnCanceled = False 'abort
listMsgs.Clear 'nero messages
'wait for drive event done
Drive.CDInfo NERO_READ_ISRC 'driveFinished set to true in Drive_OnDoneCDInfo()
Do While Not driveFinished
If burnCanceled Then 'abort
GoTo PROC_EXIT
End If
DoEvents
Loop
' is there a disc in the burner drive
...
' is the cd empty
...
' is enough space on the CD to burn all files
...
' set name of CD
If txtCDName.Text = "" Then
txtCDName.Text = "Exported Images"
End If
nFileSystemDescContainer.Name2 = txtCDName.Text
nFolder.Name = txtCDName.Text + " " + Format(Now, "dd") + "-" + Format(Now, "mm") + "-" + Format(Now, "yyyy") + _
"-" + Format(Now, "hh") + "-" + Format(Now, "nn") + "-" + Format(Now, "ss")
'build file tree
On Error GoTo PROC_EXIT
BuildFileTree
nISOTrack.Name = "ExportedImages"
nISOTrack.RootFolder = nFolder
nISOTrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET
driveFinished = False
On Error GoTo PROC_ERR
'check if underrun protection is available, if it is then use
If Drive.Capabilities And NERO_CAP_BUF_UNDERRUN_PROT Then
Drive.BurnIsoAudioCD "Export", "Image", 0, nISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE + _
NERO_BURN_FLAG_BUF_UNDERRUN_PROT, 4, NERO_MEDIA_CD
Else
Drive.BurnIsoAudioCD "Export", "Image", 0, nISOTrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE, _
4, NERO_MEDIA_CD
End If
THIS IS WHERE THE CODE STOP EXECUTING
Do While Not driveFinished 'driveFinished set to true in Drive_OnDoneBurn()
If burnCanceled Then
GoTo PROC_EXIT
End If
DoEvents
Loop
'reset form buttons & list boxes
PROC_EXIT:
Exit Sub
End Sub
I get the same error when I try burning mp3 with the NeroFiddles sample.
Any help would be greatly appreciated.
Thanks,
Grace