MultiSession DVD Problem with NEROCOM

Hi Guys,

I am working on an application for Backups in VB6, using NeroSDK-1.04 (NEROCOM) for NERO 6.3.1.6.
With the help of this forum is was able to create a test aplication that depending on a variable, that says if the DVD has already a session, writes one complete folder to a DVD+RW or appends other folder to the already existing session.
The burning of files when the DVD is empty works fine and, after the burning process is complete, I can clearly see the infomation in the DVD drive.
For the creation of a new session on the same DVD, although I get no error and the burning process ends succesfully, when I try to look at the information burned in the DVD Drive I get an error saying “The file or directory is corrupted and unreadable”.

Please help me.
Thanks in advance!

Here is the code:
Public WithEvents nero As nero
Public drives As INeroDrives
Public WithEvents drive As NeroDrive
Public strMessages As String
Public fs As New FileSystemObject
Dim NumExistingSessions As Integer
Dim DriveFinished As Boolean
Dim RootNeroFolder As NeroFolder
Dim NCDStamp As NeroCDStamp

Private Sub btnAbort_Click()
nero.Abort
End Sub

Private Sub Burn_Click()
btnAbort.Enabled = True
Burn.Enabled = False

Dim drives As INeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_DVD_ANY)
Set drive = drives(AvailableDevices.ListIndex)
drive.SetDeviceOption NERO_DEVICE_OPTION_BOOKTYPE_DVDROM, 1 'For Subsequent Writes

'Create the ISO root folder first
Set RootNeroFolder = New NeroFolder
RootNeroFolder.Name = "SomeName"

'Set up the ISOTrack
Set NeroISOTrack = New NeroISOTrack
NeroISOTrack.Name = "TITULO?"
NeroISOTrack.RootFolder = RootNeroFolder
NeroISOTrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET + NERO_BURN_OPTION_USE_ALLSPACE
    
Dim iBurnFlags As Integer

'Use FileSystemObject to get the folder you want to add to the DVD
If (OptSessionDVD) Then
    'Import previous DVD sessions
    Dim I As Integer
    Dim X As Long
    DriveFinished = False
    Call GetInfo
    While Not DriveFinished
        X = DoEvents()
    Wend
    
    If NumExistingSessions = 0 Then
        GoTo handle_error
    End If
    
    For I = 0 To NumExistingSessions - 1
        DriveFinished = False
    
        drive.ImportIsoTrack I, NERO_IMPORT_ISO_ONLY
        While Not DriveFinished
         X = DoEvents()
        Wend
    Next

    Set Folder = fs.GetFolder("C:\WUTemp\")
Else
    Set NCDStamp = Nothing
    Set Folder = fs.GetFolder("C:\Journal\")
End If

iBurnFlags = NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DAO + NERO_BURN_FLAG_CLOSE_SESSION + NERO_BURN_FLAG_DISABLE_EJECT

'Add the folder to the root folder using the recursive "add_folder_files()" function (defined below)
RootNeroFolder.Folders.Add add_folder_files(Folder)

'Check if it stands Buffer Underrun Protection
If drive.Capabilities And NERO_CAP_BUF_UNDERRUN_PROT Then
    iBurnFlags = iBurnFlags + NERO_BURN_FLAG_BUF_UNDERRUN_PROT
End If

'Burn the disc
drive.BurnIsoAudioCD "", "", 0, NeroISOTrack, Nothing, NCDStamp, iBurnFlags, 2.4, NERO_MEDIA_DVD_ANY
 
GoTo quit

handle_error:
strMessages = strMessages + Err.Description + Chr(13) + Chr(10) + nero.LastError
edtMessages = strMessages
quit:
End Sub

Private Sub GetInfo()
Dim X
Dim drives As INeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_DVD_ANY)
Set drive = drives(AvailableDevices.ListIndex)
drive.CDInfo NERO_READ_ISRC
X = DoEvents()
End Sub

Private Sub drive_OnAborted(Abort As Boolean)
Abort = False
End Sub
Private Sub drive_OnAddLogLine(TextType As NEROLib.NERO_TEXT_TYPE, Text As String)
strMessages = strMessages + Text + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub drive_OnDoneBurn(StatusCode As NEROLib.NERO_BURN_ERROR)
strMessages = strMessages + Chr(13) + Chr(10) + nero.ErrorLog + Chr(13) + Chr(10)
strMessages = strMessages + nero.LastError + Chr(13) + Chr(10)
strMessages = strMessages + "Burn finished "
If StatusCode <> NEROLib.NERO_BURN_OK Then
strMessages = strMessages + “NOT (” & StatusCode & “)”
End If
strMessages = strMessages + “successfully!” + Chr(13) + Chr(10)
edtMessages = strMessages
btnAbort.Enabled = False
Burn.Enabled = True
ProgressBar.Value = 0
End Sub

Private Sub Drive_OnDoneCDInfo(ByVal pCDInfo As NEROLib.INeroCDInfo)
NumExistingSessions = pCDInfo.Tracks.Count
DriveFinished = True
End Sub
Private Sub Drive_OnDoneImport(Ok As Boolean, inFolder As NEROLib.INeroFolder, CDStamp As NEROLib.INeroCDStamp)
If Ok Then
RootNeroFolder.Folders.Add inFolder
Set NCDStamp = CDStamp
Else
MsgBox “Error Reading In Data”
End If
DriveFinished = True
End Sub

Private Sub drive_OnDoneWaitForMedia(Success As Boolean)
strMessages = strMessages + “Done waiting for media.” + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub drive_OnProgress(ProgressInPercent As Long, Abort As Boolean)
Abort = False
ProgressBar.Value = ProgressInPercent
End Sub
Private Sub drive_OnSetPhase(Text As String)
strMessages = strMessages + Text + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub Form_Initialize()
Set nero = New nero
OptNewDVD = True
Burn.Enabled = True

ProgressBar.Value = 0
strMessages = ""
Dim drives As INeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_DVD_ANY)

For myIndex = 0 To drives.Count - 1
    AvailableDevices.AddItem drives(myIndex).DeviceName, myIndex
Next
AvailableDevices.ListIndex = 0

ErrHandler:
Exit Sub
End Sub
Private Sub nero_OnMegaFatal()
strMessages = strMessages + “A mega fatal error has occurred.” + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub nero_OnNonEmptyCDRW(Response As NEROLib.NERO_RESPONSE)
strMessages = strMessages + “CD-RW not empty!” + Chr(13) + Chr(10)
edtMessages = strMessages
Response = NERO_RETURN_EXIT
End Sub
Private Sub nero_OnRestart()
strMessages = strMessages + “The system is being restarted.” + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub nero_OnWaitCD(WaitCD As NEROLib.NERO_WAITCD_TYPE, WaitCDLocalizedText As String)
strMessages = strMessages + WaitCDLocalizedText + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub nero_OnWaitCDDone()
strMessages = strMessages + “Done waiting for CD.” + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub
Private Sub nero_OnWaitCDMediaInfo(LastDetectedMedia As NEROLib.NERO_MEDIA_TYPE, LastDetectedMediaName As String, RequestedMedia As NEROLib.NERO_MEDIA_TYPE, RequestedMediaName As String)
strMessages = strMessages + “Waiting for a particular media type:” + Chr(13) + Chr(10)
strMessages = strMessages + RequestedMediaName + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub

Private Sub nero_OnWaitCDReminder()
strMessages = strMessages + “Still waiting for CD…” + Chr(13) + Chr(10)
edtMessages = strMessages
End Sub

Public Function add_folder_files(dir) As NeroFolder
Dim NeroFolder As NeroFolder
Dim NeroFile As NeroFile

Dim File As File
Dim Folder As Folder
Dim Files As Files
Dim Folders As Folders

'Get the folder and files for this folder
Set Folder = fs.GetFolder(dir.Path)
Set Folders = Folder.SubFolders
Set Files = Folder.Files

'Create a new nero folder and name it
Set NeroFolder = New NeroFolder
NeroFolder.Name = dir.Name

'Add all the files to the nero folder
For Each File In Files
Set NeroFile = New NeroFile
NeroFile.Name = File.Name
NeroFile.SourceFilePath = File.Path
NeroFolder.Files.Add NeroFile
Next

'Add all of the folders to the nero folder
For Each Folder In Folders
NeroFolder.Folders.Add add_folder_files(Folder)
Next

'Return this folder
Set add_folder_files = NeroFolder
End Function

I forgot to mention that since I am doing a “Proof of concepts” test, I am using the Nero 6.3.1.3 Demo Version.
Is there a possibility that the fact that I am using a demo version is restricting me from burning several sessions on the same DVD?